• Hello there.

    I have an odd issue. Sometimes my website gives the 403 – Forbidden error and I don’t really know how to fix this. I’ve read people who had 403 as a persistent issue until it was fixed, but this is not really the case – normally there aren’t any issues, just once in a while, and some days – like today – it seems more common all of a sudden.

    As I said, I don’t even know how to begin to tackle it. Any clue?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Have you spoken to your hosts about this?

    Thread Starter AlexiousRahl

    (@alexiousrahl)

    Yes, I have. They said that it is related to a permissions error.
    They suggested that it could have to do with a WordPress plugin.

    I’m not sure which plugin could do such a thing, though.

    Thread Starter AlexiousRahl

    (@alexiousrahl)

    Just to follow up that this keeps happening, especially when traffic is high. To get the site back online I can only rename .htaccess, but then only the homepage works and posts return 404. I saved the permalinks structure in WP and magically, everything worked again.

    I think there’s something wrong with rewrite rules.
    I’ve found this solution on the Web – what do you think?

    http://stackoverflow.com/a/9050019

    A few years late, but I have a solution for the most recent version of WordPress, which has this same issue (WordPress-generated .htaccess files break sites, reuslting in 403 Forbidden error messages). Here’s that it looks like when WordPress creates it:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress
    The problem is that the conditional doesn’t work. It doesn’t work because the module it’s looking for isn’t .c, it’s .so. I think this is a platform-specific, or configuration-specific issue, where Mac OS and Lunix Apache installations are set up for .so AKA ‘shared-object’ modules. Looking for a .c module shouldn’t break the conditional, I think that’s a bug, but it’s the issue.

    Simply change the mod_rewrite.c to mod_rewrite.so and you’re all set to go!

    # BEGIN WordPress
    <IfModule mod_rewrite.so>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Occasional 403 – Forbidden Error – Any solutions?’ is closed to new replies.