Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

# END WordPress
s <---See This?!
share|improve this question

3 Answers 3

up vote 1 down vote accepted

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

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer
    
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 '11 at 16:47
    
It actually had code that was appending to the .htaccess file. –  laebshade Sep 11 '11 at 21:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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