How to Get Better Performance when Using .htaccess Files
To get a better website performance you can tell apache where to find your websites .htaccess files instead of letting apache search for them recursively ..
First find the location of these .htaccess files on your web server ..
@paulbooker:/var/www/vhosts/paulbooker.co.uk/public# find . -name .htaccess
./.htaccess
./sites/default/files/.htaccess
.. and then add a directory block for each in your domains apache configuration file ..
# Admin email, Server Name (domain name) and any aliases
ServerAdmin webmaster@paulbooker.co.uk
ServerName paulbooker.co.uk
ServerAlias www.paulbooker.co.uk
# Index file and Document Root (where the public files are located)
DirectoryIndex index.php
DocumentRoot /var/www/vhosts/paulbooker.co.uk/public
Options -Indexes -FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
Include /var/www/vhosts/paulbooker.co.uk/public/.htaccess
Include /var/www/vhosts/paulbooker.co.uk/public/sites/default/files/.htaccess
# Custom log file locations
LogLevel warn
ErrorLog /var/www/vhosts/paulbooker.co.uk/log/error.log
CustomLog /var/www/vhosts/paulbooker.co.uk/log/access.log combined
You will need to reload apache for these changes to take effect ..
service apache2 reload
A further improvement would be to put all the directives that are inside the .htaccess file into your domains apache configuration file. You would then however need to look for and manually bring over any changes that come from upsteam.