Title: .htaccess automatically changes causing 500 error
Last modified: August 19, 2016

---

# .htaccess automatically changes causing 500 error

 *  [ppsca](https://wordpress.org/support/users/ppsca/)
 * (@ppsca)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/htaccess-automatically-changes-causing-500-error/)
 * Hi,
 * I apologize if a solution has already been posted in other areas of this forum
   but I was unable to find help, hence my post.
 * I keep getting a 500 error on all pages/posts on my site (including the dashboard
   and admin area). The only cause that I can see is that my htaccess file keeps
   being modified somehow by a script from this below (which works)
 * # BEGIN WordPress
    <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond%{
   REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.
   php [L] RewriteCond %{HTTP_HOST} ^mysite\.com RewriteRule ^(.*)$ [http://www.mysite.com/$1](http://www.mysite.com/$1)[
   R=permanent,L] # END WordPress </IfModule>
 * to this:
    # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase/
   RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule./
   index.php [L] </IfModule>
 * # END WordPress
    </IfModule>
 * which doesn’t work and causes 500 errors throughout my site.
 * I have tried to CHMOD the htaccess file to read only (doesn’t work either).
 * 2 questions:
    1. Why does this happen automatically?
 * 2. How can I stop it? It is doing my head in having to manually copy over a backup
   every time it happens.
 * Thanks in anticipation

The topic ‘.htaccess automatically changes causing 500 error’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [ppsca](https://wordpress.org/support/users/ppsca/)
 * Last activity: [18 years, 4 months ago](https://wordpress.org/support/topic/htaccess-automatically-changes-causing-500-error/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
