Support » Plugin: iThemes Security (formerly Better WP Security) » .htaccess Changes Causing 404 Errors

  • Occasionally, Better WP Security’s rewrite of my .htaccess file eliminates the Mod_rewrite section (pasted in below). The removal of this section breaks all my Categories links, which breaks my menu and essentially brings the whole site down. I’m getting tired of having to check for it every day.

    I see a section on my Better WP Security dashboard labeled “Rewrite Rules” for .htaccess but it’s view-only. How can I edit the “Rewrite Rules” to include this WP block, so it will never again be eliminated by Better WP Security’s changes to .htaccess?

    – – – – –

    # 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]
    # End WordPress

Viewing 4 replies - 1 through 4 (of 4 total)
  • P.S. Should’ve mentioned – every time this happens the fix is the same: I paste the missing block back in, and my site’s immediately back to normal. It’s just that there are some days when I can’t check it (e.g., away from computer) and my site ends up being down all day if the mod_rewrite block has been removed by Better WP Security.

    This is still happening. Does anyone have a solution?

    This is happening to me, too. Same problem, same fix.

    @aprillhamilton – I may have the same problem as you except the whole block you posted wasn’t removed, just the following…

    RewriteEngine On
    RewriteBase /

    …which is basically the same as removing the whole block. My situation is bit different as I use the WP SuprCache plugin which also turns on Mod_rewrite (if I set it that way). Either way, if you want an easier way to add that particular block back in, just save your Permalink structure again via the WordPress Admin.

    Just to say I did…

    In your WP Admin, navigate to Settings/Permalinks, make absolutely sure your site’s permalink structure is still selected (it should be, if it isn’t then there’s a more serious problem) and hit the “Save changes” button. If you check the contents of your .htaccess file via FTP (or however) you should see Mod_rewrite block added back in.

    Better WP Security should not ever touch the “Mod_rewrite” block at all in my opinion.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘.htaccess Changes Causing 404 Errors’ is closed to new replies.