• Smith

    (@hurleychandler)


    I recently moved my site to a new Linux Server running Apache 2.0 and am trying to update the Pretty Permalinks to the new URL. WP wasn’t able to install the .htaccess file automatically, but I did manually install it with the following code:

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

    I set the permissions of the file to 666 and uploaded it to my server. Now, all of the pages I go to throw this error message:

    Access forbidden!
    
    You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
    
    If you think this is a server error, please contact the webmaster.
    Error 403

    The directory is not read-protected and the index document is in the default directory. I’ve read the Pretty Permalinks Codex Doc and forwarded it along to my IT department, but none of the methods solved the problem. Please help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Smith

    (@hurleychandler)

    The error message goes away if I delete the .htaccess file.

    Was there any resolution to this problem? I am having the same issue (WP ver2.9.2 on my local OSX machine): after turning on Pretty PermaLinks and adding the changes to the htaccess file (located in the root directory), I get a 403 error – “You don’t have permission to access …/wordpress/ on this server”. When I open the htaccess file and comment out the line “RewriteEngine On”, I can see the site again. Or if I revert back to default links, I can see the site again.

    This is all that’s in my htaccess file:

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

    Is anyone out there that knows anything about this? I would be eternally grateful!!

    I did find this in later research (https://faq.wordpress.net/view.php?p=20):

    “…try adding the following line at the top (the very first line) of .htaccess :”

    Options +SymLinksIfOwnerMatch

    Or

    Options +FollowSymLinks

    This did resolve my probelm, at least, so far, but I don’t know why or what caused the problem in the first place.

    Options +FollowSymLinks did it for me. I’m on OSX too.
    Weird: Options FollowSymLinks is declared in the <Directory /> bit in main httpd.conf file. Wonder if it gets overridden somewhere else?
    Ah well, sorted anyway!

    Very much appreciated phrnck ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Access forbidden after adding .htaccess for Pretty Permalinks mod_rewrite’ is closed to new replies.