• cmecham

    (@cmecham)


    My client’s site keeps having this problem. The home page appears fine, but all the interior pages return 404 errors. The .htaccess file keep getting re-written. When it looks like this everything works fine:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <IfModule mod_rewrite.c>
    	RewriteEngine On
    	RewriteBase /
    	RewriteCond %{REQUEST_FILENAME} !-f
    	RewriteRule ^[a-z0-9]{1,4}[.](htm|pdf|jar) default.php [L]
    </IfModule>
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    But, when I look at the file after a problem, it looks like this:

    <IfModule mod_rewrite.c>
    	RewriteEngine On
    	RewriteBase /
    	RewriteCond %{REQUEST_FILENAME} !-f
    	RewriteRule ^[a-z0-9]{1,4}[.](htm|pdf|jar) default.php [L]
    </IfModule>

    Obviously all the WP information has been removed from the file. What would cause this? How do I keep it from happening?

Viewing 1 replies (of 1 total)
  • Pioneer Web Design

    (@swansonphotos)

    What would cause this?

    Recent site changes/updates, a plugin or theme are likely issues, as well as a compromised site…providing a site link may help forum users discover a known issue, without we can simply only guess…

    That said, fix the file and then change permissions on the file so it cannot be modified…

    You can also ask host about any log files referring to such edits…

    To check if site is compromised scan it at Sucuri.

Viewing 1 replies (of 1 total)
  • The topic ‘part of my htaccess file keeps disappearing’ is closed to new replies.