Title: .htaccess Changes Causing 404 Errors
Last modified: August 21, 2016

---

# .htaccess Changes Causing 404 Errors

 *  [AprilLHamilton](https://wordpress.org/support/users/aprillhamilton/)
 * (@aprillhamilton)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/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] </IfModule> # End WordPress
 * [http://wordpress.org/extend/plugins/better-wp-security/](http://wordpress.org/extend/plugins/better-wp-security/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [AprilLHamilton](https://wordpress.org/support/users/aprillhamilton/)
 * (@aprillhamilton)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/htaccess-changes-causing-404-errors/#post-3848464)
 * 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.
 *  Thread Starter [AprilLHamilton](https://wordpress.org/support/users/aprillhamilton/)
 * (@aprillhamilton)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/htaccess-changes-causing-404-errors/#post-3848748)
 * This is still happening. Does anyone have a solution?
 *  [Rideplan](https://wordpress.org/support/users/rideplan/)
 * (@rideplan)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/htaccess-changes-causing-404-errors/#post-3848750)
 * This is happening to me, too. Same problem, same fix.
 *  [KirkM](https://wordpress.org/support/users/kirkm/)
 * (@kirkm)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/htaccess-changes-causing-404-errors/#post-3848752)
 * [@aprillhamilton](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/better-wp-security/assets/icon.svg?rev=3529351)
 * [Kadence Security – Password, Two Factor Authentication, and Brute Force Protection](https://wordpress.org/plugins/better-wp-security/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-wp-security/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-wp-security/)
 * [Active Topics](https://wordpress.org/support/plugin/better-wp-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-wp-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-wp-security/reviews/)

## Tags

 * [categories](https://wordpress.org/support/topic-tag/categories/)
 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)
 * [mod_rewrite](https://wordpress.org/support/topic-tag/mod_rewrite/)

 * 4 replies
 * 3 participants
 * Last reply from: [KirkM](https://wordpress.org/support/users/kirkm/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/htaccess-changes-causing-404-errors/#post-3848752)
 * Status: not resolved