WordPress.org

Ready to get started?Download WordPress

Forums

.htaccess file bringing down website (9 posts)

  1. allanlud
    Member
    Posted 6 months ago #

    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.

  2. esmi
    Forum Moderator
    Posted 6 months ago #

    If these two sites are identical, then it would suggest that this is a server issue.

  3. allanlud
    Member
    Posted 6 months ago #

    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.

  4. esmi
    Forum Moderator
    Posted 6 months ago #

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

  5. allanlud
    Member
    Posted 6 months ago #

    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?

  6. esmi
    Forum Moderator
    Posted 6 months ago #

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

  7. allanlud
    Member
    Posted 6 months ago #

    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.

  8. esmi
    Forum Moderator
    Posted 6 months ago #

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

  9. allanlud
    Member
    Posted 6 months ago #

    Thanks esmi will do that.

Reply

You must log in to post.

About this Topic

Tags