Exclude directory or folder from a rewrite rule in .htaccess

To exclude a directory or group of directories from rules in your .htaccess insert the following line before the rules in your .htaccess


RewriteRule ^(directory1|directory2)($|/) - [L]
  • 121 Users Found This Useful

Was this answer helpful?

Related Articles

What are these vt directories?

Those are FrontPage extension directories. If you have and no longer need them you can uninstall...

How to create a temporary 302 redirect via .htaccess

An easy way to create a temporary redirect from one page to another web page is to use the 302...

How do I submit my site to search engines?

Submit your website to popular search engines to increase your webite's exposure and visitor...

.html or .htm parsed as .shtml not working

To parse .html or .htm files as .shtml add the following to your .htaccess file in the...

403 Error on POST

This can occur for several reasons: Be sure your file permissions are correct. If the file needs...