Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2010
    Posts
    44
    Thanks
    2
    Thanked 0 Times in 0 Posts

    how to hide cgi-bin in url

    I have a shopping cart thats in the cgi-bin.

    But I don't want the user to see that. I know theres a way to mask it, but I just can't seem to find any clear tutorials on it.

    Also, I have wordpress installed, so could there be any conflicts between the two?

    heres what ive tried so far:

    Code:
    # shopping redirect
    RewriteEngine On
    RewriteRule ^shop\/?$ \/cgi-bin\/cart\/
    
    #end shop rdrct
    the result is that I get a 404.

  • #2
    Regular Coder Samhain13's Avatar
    Join Date
    Aug 2008
    Location
    Pilipinas
    Posts
    169
    Thanks
    4
    Thanked 18 Times in 18 Posts
    You can try:

    Code:
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^/shop.*
    RewriteRule ^shop/?$ cgi-bin/cart/$1 [L]
    Basically, you'll need to evaluate the request URI so that the rewrite rule doesn't interfere with your WordPress rules. But you'll have to ask someone else for the correct regular expressions as that's one of my weak points.
    I am a Man of Truth. I am a Free Human Person. I am a Peacemaker.
    ** Independent Multimedia Artist in Pasig **


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •