Forbidden Error with .htaccess files in WordPress
Posted by Apache, FollowSymlinks, Httpd, Linux, RewriteBase, RewriteCond, RewriteEngine, RewriteRule, Wordpress | Posted on 24-03-2010
| Posted inI’ve been using WordPress for a number of years and decided to switch my permalink structure. It originally was set to the default setting of ?p=100. I wanted to increase my SEO so I changed it to the current format Year / Month / Day / Post-Name. When I switch over, wordpress automatically created a .htaccess file in my webroot folder and locked me out of my website with a Forbidden Error.
Forbidden You don't have permission to access / on this server.
The .htaccess file that was created looked like this.
< IfModule mod_rewrite.c > RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] < / IfModule >
After chatting with my web administrator, we came to the conclusion that FollowSymlinks in Apache was off be default. I needed to manually turn it on. The new .htaccess file looks like this.
< IfModule mod_rewrite.c > Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] < / IfModule >
Additional Links: