• Hi all,

    I’ve been doing some maintenance work on a website. There are a few plugins being used and most were updated recently.

    Before any updates are done on the live site I do them first on a duplicate site on the same server.

    The most recent problem is that when the admin adds a new post, the .htaccess file seems to get overwitten and brings up an 500 error for the site.

    This happened about an hour ago and I have the .htaccess file that caused the problem and a backup that fixes the problem.

    The only difference I noticed in the 2 was that some code was misplaced. This is what it should be like:

    # Increase cookie security
    <IfModule php5_module>
      php_value session.cookie_httponly true
    </IfModule>
    
    # END HTML5 Boilerplate
    
    # END WordPress

    and this is what it gets changed too.

    # Increase cookie security
    <IfModule php5_module>
      php_value session.cookie_httponly true
    </IfModule>
    
    # END HTML5 Boilerplate
    
    # END WordPress
    pend to error (doesn't accept empty string, use whitespace if you need)
    # php_value error_append_string " "
    
    # Increase cookie security
    <IfModule php5_module>
      php_value session.cookie_httponly true
    </IfModule>
    
    # END HTML5 Boilerplate
    
    # END WordPress

    As you can see it repeats and breaks the code in the .htaccess file (these are the last lines in the file).

    Is there anything I can do to solve this?

    I’ll also point out that the duplicate site has no problems.

Viewing 8 replies - 1 through 8 (of 8 total)
  • If these two sites are identical, then it would suggest that this is a server issue.

    Thread Starter allanlud

    (@allanlud)

    Thanks for the quick response esmi.

    The 2 sites are on the same server, one is a sub domain.

    I have Better WP Security plugin installed so this would be working a lot more on the live site than the duplicate site, just wonder if that would have anything to do with it.

    Possibly. Can you replicate the problem with this plugin deactivated?

    Thread Starter allanlud

    (@allanlud)

    Hi esmi, I’ve deactivated the security plugin and added a new post and it didn’t crash, so I activated it again and added a new post and it still didn’t crash.

    Over the last few days it has crashed twice, and both times were when the client was adding a post with an image.

    I’ll ask her to try again and see if it crashes? I haven’t changed anything though, maybe it was just a coincidence that it happened to crash while she was posting.

    Any ideas why the htaccess file would have that duplicate code in it?

    It could be a complete coincidence. Have you checked the site’s error logs for messages?

    Thread Starter allanlud

    (@allanlud)

    To get access to error logs do I need access to the hosting control panel – if so I don’t have that and I can’t get it as someone else is in control of that.

    You could ask them for a copy of the site’s error logs.

    Thread Starter allanlud

    (@allanlud)

    Thanks esmi will do that.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘.htaccess file bringing down website’ is closed to new replies.