.htaccess - Can't get Apache mod_rewrite to ignore a directory -


i'm trying apache mod_rewrite ignore directories. here's part of httpd.conf:

rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewriterule ^(img|css|js)($|/) - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] 

if go http://mydomain.com/img/random_path, still see error message generated index.php (rather default error page).

i think can use rule condition

rewritecond %{request_uri} !\/img\/ 

before rewrite rules. prevent rewriting urls contain "/img/" string.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -