.htaccess - htaccess general rewrite but skip images -


i trying include file extensions being rewritten fi dont exit.

(image types: jpg|gif|png)

currenty have:

options +followsymlinks rewriteengine on  rewritecond %{document_root}/$1 -f [or] rewritecond %{document_root}/$1 -d rewriterule (.*) - [s=1] rewriterule (.*) /index.php?id=$1 [l] 

i need skip request url ends in: .gif/.jpg/.png

been looking everywhere.. can't find out how it. thanks!

this should it:

options +followsymlinks rewriteengine on  rewritecond %{request_uri} !\.(gif|jpg|png)$ rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule (.*) /index.php?id=$1 [l] 

this says, filename doesn't end gif jpg or png, , isn't file, , isn't directory, send index.php


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -