.htaccess rewrite rule to prevent image url rewrites -


i new htaccess rewrite rules. need rewrite url myurl.com/1000/samsung-123 myurl.com/user/product.php?id=1000. have used following rewrite rule in .htaccess file.

rewriteengine on rewritebase /  rewriterule ([0-9]+)/(.*)$ user/product.php?id=$1 [pt,l] 

the rule works fine. rewrites images url myurl.com/img/_product/1000/1000a.jpg.

how can prevent one? there way skip rule if extension (as .jpg, .png, .php) entered in url?

rewriteengine on rewritebase /  rewritecond img/_product/$1/$1a.jpg !-f rewriterule ([0-9]+)/(.*)$ user/product.php?id=$1 [pt,l] 

perhaps help.

  • fixed.

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -