View Full Version : how to hide cgi-bin in url

11-23-2010, 12:48 AM
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:

# shopping redirect
RewriteEngine On
RewriteRule ^shop\/?$ \/cgi-bin\/cart\/

#end shop rdrct

the result is that I get a 404.

11-23-2010, 05:00 AM
You can try:

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. :D