Direct from Apache's documentation:

When AllowOverride is set to allow the use of .htaccess files, Apache will look in every directory for .htaccess files. Thus, permitting .htaccess files causes a performance hit, whether or not you actually even use them! Also, the .htaccess file is loaded every time a document is requested.

So, why use them?

If your answer is because your SEO-friendly WordPress permalinks won't function without them, then you've come to the right place!

Just about anything that can be done in an .htaccess file can be performed within a <Directory> block within your httpd.conf file. Since you already have a <Directory> block for your site, containing the AllowOverride directive, you can simply remove AllowOverride, and append your rewrite directives in it's place.


<Directory /var/www/html/mysite_com>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


Leave a Reply

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