.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

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -