.htaccess and 500 error, extra character added

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.

Read More

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]
</IfModule>

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

Related posts

Leave a Reply

3 comments

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

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

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