Saturday, 17 August 2013

.htaccess same rewrite rule with different attributes

.htaccess same rewrite rule with different attributes

I couldn't figure out how am I supposed to separate these two rules.
RewriteRule ^products.php/([^/\.]+)/?$
products.php?type=product&product_id=$1 [L]
RewriteRule ^products.php/([^/\.]+)/?$
products.php?type=product&category=$1 [L]
They both go to the same page the only difference is their attributes and
because of that they overlap each other. it never even goes to the second
rule.
Anyone has an idea how to fix this?

No comments:

Post a Comment