[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] Rewrite Condition Help


On Thu, 21 Oct 2004 19:27:34 -0400
"Aftermarket Cellular" <suppressed> wrote:

> 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

Try ([A-Z0-9]+) instead of (.+)

	Racke

-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team

_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.