WordPress "Pretty Permalink" mod_rewrite Rules
Why do all of my websites break when I add a mod_rewrite directive to an individual website's config file?
WordPress wants an .htaccess file in its website root to enable "pretty permalinks" (where "index.php?" and other query string params are not required in the URL.) WordPress provides the following apache config directives that it wants in this .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
mod_rewrite is enabled in apache2.
I've read that enabling .htaccess files mean a "substantial performance penalty" so I don't want to use them since I'm trying to optimize the website to handle a high traffic spike. So, I added the directives above into the individual apache config file for the website, using vi in Terminal ssh connection.
When I stopped then started Web service via Server Admin, all of my websites fail to display. Thoughts?