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

How can I change the index listing in a directory?

You can change the initial page that is sent to client requests when a directory is accessed by...

How do I parse html files as shtml?

Create an .htaccess file in the directory needed and add the following: AddHandler...

Domain Slamming - Beware

There are several companies out there using a predatory practice of attempting to have you renew...

What is a Top-Level-Domain (TLD)?

TLD stands for Top Level Domain. This includes any domain names which suffix is .com, .net, .org,...

What perl modules are installed on the server?

You can get a complete list of the modules that are installed by going to the control panel and...