Web Development

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

[cc lang=”apache”]
# Increase performace with AllowOverride
AllowOverride None
[/cc]

Enable AllowOverride for Specific Directory

[cc lang=”apache”]
# enable allowoverride for specific directory

AllowOverride Options

[/cc]

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

Shares:

Leave a Reply

Your email address will not be published. Required fields are marked *