Reputation: 667
I need an advice from someone which is a better expert in rewrite rules and regex expressions than me.
I have the following rewrite rule:
RewriteRule ^([^/]*)/$ /product.php?prod=$1 [L]
It basically rewrites any page between the slashes to product.php
www.website.com/prod1/
www.website.com/prod2/
www.website.com/apple/
www.website.com/orange/
However, I would like to only rewrite specific pages like:
www.website.com/apple/
www.website.com/orange/
How can I do this?
Upvotes: 2
Views: 2242
Reputation: 8197
It may help:
RewriteRule ^(apple|orange)/$ /product.php?prod=$1 [L]
Upvotes: 3