You are hereHome / WordPress Plugins / Wordpress, mod_rewrite and 403: Access Denied

Wordpress, mod_rewrite and 403: Access Denied


By Gerd Riesselmann - Posted on 06 October 2006

If Permalinks are enabled in WordPress 2.0 or higher, the following code usually is generated to be placed in a .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine Off
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule  . /index.php [L]
</IfModule>

It happened to me, however, that as soon as this .htaccess was active, the server returned an error code of 403: Access Denied. In this case, just comment out or remove the lines <IfModule mod_rewrite.c> and </IfModule>:

#<IfModule mod_rewrite.c>
RewriteEngine Off
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule  . /index.php [L]
#</IfModule>

This worked for me.

PS: If you get an error of 500: Server Error, this probably means that mod_rewrite is not enabled on your server. Ask you provider to enable it.

Topics