I am having a weird problem. Every few days I go to my website and get an "Internal Server Error" - Or 500 error. I go into the .htaccess file of the site and notice it's been altered. One character is added at the end of the file.

It's easy to fix and continue on, but it keeps happening. htaccess permissions are 644 and the error logs don't say anything about this so I don't know where to start.

Anybody have an idea as to what's going on or point me to some information on this issue?

here is the "altered" htaccess code:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index-php [L]

# END WordPress
s <---See This?!

3 Answers 3


Assuming you're on Linux, if you go to your wp-content/plugins folder and run

grep -R 'htaccess' *

it should let you know if any plugins are addressing that file by name


weird ...

  1. is the site auto updated somehow, via FTP, SVN, RSYNC, etc.?

  2. even though the permissions are 644, it might still be writable by the php user, can you change to a different user?

  3. perhaps its a plugin that is inadvertently adding the stray character.


I have seen this before, and it turned out to be a theme that was adding to the .htaccess file. Did you recently update WordPress, a theme, or a plugin? Try changing your theme to the default Twenty Eleven theme, fix the .htaccess file, reload your site a couple of times, then check your .htaccess file again.

  • Thanks, laebshade. I do think it has something to do with the themes files. Do you remember by any chance what was wrong with the files you came across?
    – Jukov
    Sep 11, 2011 at 16:47
  • It actually had code that was appending to the .htaccess file.
    – laebshade
    Sep 11, 2011 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.