.htaccess rewrite rule to prevent image url rewrites
I am very new to htaccess rewrite rules. I need to rewrite the url
myurl.com/1000/samsung-123 to myurl.com/user/product.php?id=1000. I have
used the following rewrite rule in my .htaccess file.
RewriteEngine on
RewriteBase /
RewriteRule ([0-9]+)/(.*)$ user/product.php?id=$1 [PT,L]
The rule works fine. However it also rewrites my images url like
myurl.com/img/_product/1000/1000A.jpg.
How can I prevent this one? Is there a way to skip the rule if extension
(as .jpg, .png, .php) is entered in the url?
No comments:
Post a Comment