Improve Site Performance with AllowOverride

Yes you have read the correct word that we can increase the Site performace with AllowOverride.

We can increase our site performace by enabeling the AllowOverride ro only required directories.

This is how it works.

If AllowOverride is enabled for whole site then server must have to check for the .htaccess file in all directories your site have. Really server will check for all directories which may or may not have a htaccess file.

To prevent this, We have to disable AllowOverride in the root htaccess file and enable only for the directory for which we need to enable AlloOverride from server’s config file.

Disable AllowOverride

# Increase performace with AllowOverride AllowOverride None
# Increase performace with AllowOverride
AllowOverride None

Enable AllowOverride for Specific Directory

# enable allowoverride for specific directory AllowOverride Options
# enable allowoverride for specific directory
<Directory /www/path/to/actual/directory>
 AllowOverride Options

Note: If you do not have access to your server’s configuration file and want to use AllowOverride then do not use this Directive.

Related Posts

Written by Avinash

Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.

View all posts by: