WordPress.org

Ready to get started?Download WordPress

Forums

iThemes Security (formerly Better WP Security)
.htaccess Changes Causing 404 Errors (5 posts)

  1. AprilLHamilton
    Member
    Posted 10 months ago #

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

    http://wordpress.org/extend/plugins/better-wp-security/

  2. AprilLHamilton
    Member
    Posted 10 months ago #

    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.

  3. AprilLHamilton
    Member
    Posted 9 months ago #

    This is still happening. Does anyone have a solution?

  4. Rideplan
    Member
    Posted 8 months ago #

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

  5. KirkM
    Member
    Posted 8 months ago #

    @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.

Reply

You must log in to post.

About this Plugin

About this Topic