Support » Fixing WordPress » strange htaccess hack

  • sam1111

    (@sam1111)


    A website i built for a client is continually being downed on a fairly regular basis (~4-5 times a week) by a corrupted htaccess file. This causes it to display a 500 internal server error. Whenever it happens i just replace the htaccess file with the original and it works fine (short term fix).

    The htaccess file seems to get randomly jumbled up a little differently each time it happens. Some times it will simply add an extra ‘>’ and sometimes it will duplicate random chunks of code (examples below)

    I have found numerous threads describing similar problems (with ‘s’ or ‘ss’ added to the end of the htaccess file etc.) but none exactly like what I am encountering.

    Original htaccess:

    # 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

    ——————————————-
    Corrupted htaccess example 1:

    # 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

    ———————————————
    Corrupted htaccess example 2:

    # 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
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress
    ———————————————

    Any ideas?

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘strange htaccess hack’ is closed to new replies.