[ic] Rewrite Condition Help

Aftermarket Cellular wfiore at aftermarketcellular.com
Thu Oct 21 19:27:34 EDT 2004


Hi,

I currently utilize the following rewrite rule in my .htaccess file to 
redirect:

http://aftermarketcellular.com/cellular-accessories/accessories/SKU.php
TO:
http://aftermarketcellular.com/~aftermar/cgi-bin/cart.cgi/SKU.html

RewriteRule ^cellular-accessories/accessories/(.+)\.php$ 
http://aftermarketcellular.com/~aftermar/cgi-bin/cart.cgi/$1.html 
[R=301,L]

I would like to reverse this redirect:

http://aftermarketcellular.com/~aftermar/cgi-bin/cart.cgi/SKU.html
TO:
http://aftermarketcellular.com/cellular-accessories/accessories/SKU.php

The catch is it can only redirect when the SKU contains uppercase 
letters and numbers only, no lowercase. I have been trying to do this 
for some time now but I can't get the rewrite condition correct. Could 
someone help me write a conditional statement to redirect:

http://aftermarketcellular.com/~aftermar/cgi-bin/cart.cgi/SKU.html
to:
http://aftermarketcellular.com/cellular-accessories/accessories/SKU.php

BUT NOT REDIRECT

http://aftermarketcellular.com/~aftermar/cgi-bin/cart.cgi/sku.html

Thank you

Bill



More information about the interchange-users mailing list