Forum Moderators: phranque
The concept is that different pages get called depending on the variables.
so
/catalog/type/product.htm goes to /catalog/information.htm?type=type&product=product
whilst
/catalog/type.htm goes to catalog/prices.htm?type=type
#works but problem with 2 rules together
RewriteCond %{REQUEST_URI} ^/catalog/([^/]+)/([^/]+).htm
RewriteRule ^(.*) catalog/information.htm?type=%1&product=%2 [L,NS,QSA]
RewriteCond %{REQUEST_URI} ^/catalog/([^/]+).htm
RewriteRule ^(.*) catalog/prices.htm?type=%1 [L,NS,QSA]
However I have tried and cannot get this to work as there seems no way to detect that a / is missing in the second rule as it picks up the whole string and rewrites rule 1 as well!
If I take out either one of the rules the remaining rule works as intended.
Is this the correct technique? if so what expression will detect the non-existance of a /
Read most of the posts and guidelines here but I can't find anything that covers this.
RewriteRule ^catalog/([^/]+)/([^/.]+)\.htm$ /catalog/information.htm?type=$1&product=$2 [QSA,L]
#
RewriteCond $1 !^prices$
RewriteRule ^catalog/([^/.]+)\.htm$ /catalog/prices.htm?type=%1 [QSA,L]
Jim