Title: .htaccess file being modified
Last modified: August 21, 2016

---

# .htaccess file being modified

 *  [robmoriarty](https://wordpress.org/support/users/robmoriarty/)
 * (@robmoriarty)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/htaccess-file-being-modified/)
 * On one of my WordPress installations, there appears to be a random variable that
   alters the syntax of the .htaccess file. When it first started, it would look
   like this:
 * # 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
 * and be modified to look like this:
 * # 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
 * My server support believed this issue could be caused by either one or a combination
   of installed plugins. On the most recent reoccurrence they identified that the
   file had been modified when wp-cron.php was run (whenever a visitor came to the
   site). I tried to disable this, but the site went down again when the admin user
   tried to make a change to the site. The file now looks like this:
 * # BEGIN WordPress
    <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule
   ^index\.php$ – [L] RewriteCond %{RERewriteEngine On RewriteBase / RewriteRule
   ^index\.php$ RewritRewriteCond %{REQUEST_FILENAME} !-f # END WordPress QUEST_FILENAME}!-
   d RewriteRule . /index.php [L] </IfModule>
 * # END WordPress
 * When it should look like the above example. Has anyone got any idea what the 
   hell could be causing this and how to resolve short of re-installing?

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

 *  [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/htaccess-file-being-modified/#post-4340481)
 * The first thing I would do is to make the file what it should be and then immediately
   set its permissions to 0404 (as recommended by BulletProof Security) so no plugin
   or whatever else can again ever change it. After that, the next thing that complains
   is your culprit.
 *  Thread Starter [robmoriarty](https://wordpress.org/support/users/robmoriarty/)
 * (@robmoriarty)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/htaccess-file-being-modified/#post-4340515)
 * Thanks for that suggestion. I did wonder whether file permissions might be a 
   potential solution. I shall see what effect this has and report back if needed.

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

The topic ‘.htaccess file being modified’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [robmoriarty](https://wordpress.org/support/users/robmoriarty/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/htaccess-file-being-modified/#post-4340515)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
