.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
Post a Comment