[thelist] Apache mod_rewrite

Benjamin Tilley kalos at carolina.rr.com
Wed Feb 23 10:52:41 CST 2005


RewriteRule ^/Product(.*) http://www.mydomain.com/products.cgi?$1 [NC,R,L]

That will redirect any hits for "http://www.mydomain.com/ProductA" to a 
script that you could have fed via a database.  One line instead of 
thousands.

Webmasterworld has tons of questions like this and the forum moderator 
for the Apache forum is a god send in answering questions like this 
one.  I had to hit him up when a client needed asp and I didn't want IIS 
to be my primary server (port 80) so I redirected anything in their 
directory to port 81.  Needless to say it's seemless and effecient.

-ben


More information about the thelist mailing list