1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

.htaccess

Discussion in 'WordPress' started by Tarheel, Jun 17, 2013.

  1. #1
    Every WordPress site that I use I utilize permalinks and set the structure to post-name. The past two days I have realized that when WP updates it messes up the rewrite rules in my .htaccess file and then it breaks the site - 500 error. It seems to happen once a day at the same time...same error logs on Cpanel. Has anyone ever seen this? I uninstalled the most recent plugin that I used, and also re-installed WP.
    SEMrush
    Thank you for the help.
     
    Tarheel, Jun 17, 2013 IP
    SEMrush
  2. dedideals

    dedideals Member

    Messages:
    168
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    48
    #2
    Is it when you have upgraded to a newer version or?
     
    dedideals, Jun 17, 2013 IP
  3. Tarheel

    Tarheel Member

    Messages:
    92
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    33
    #3
    No, I did nothing. That's why I couldn't figure it out. I randomly went to the website on Saturday, and that's when I noticed the issue. I went to the cpanel error logs and realized it had to do with the rewrite. When I opened the .htaccess it was all screwed up. Not sure what would be causing this.

    I suppose I could write the .htacess the way I wanted and then change the chmod so that it can't write it anymore. I'm assuming that will fix the issue...maybe?
     
    Tarheel, Jun 17, 2013 IP
  4. dedideals

    dedideals Member

    Messages:
    168
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    48
    #4
    It should do yeah.

    I honestly can't see why it would of changed without you changing it, strange!
     
    dedideals, Jun 18, 2013 IP
  5. bigsky101

    bigsky101 Greenhorn

    Messages:
    18
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    23
    #5
    Do you have WP Super Cache or other caching plugin? I know these type of plugins can rewrite the .htaccess I would disable ALL plugins and try again and if that does not work try changing your .htaccess to the following:

    # 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
    Code (markup):
    I would also make the .htaccess file unwritable after changing it. 644 should be fine but that will allow plugins and such to make changes to it. 444 will prevent plugins from making changes to the file. You will have to change it back to 644 if you want to make further changes.
     
    Last edited: Jun 18, 2013
    bigsky101, Jun 18, 2013 IP
    seo.xpert and zetttaxco like this.
  6. Tarheel

    Tarheel Member

    Messages:
    92
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    33
    #6
    bigsky101 - That's what I ended up doing. I changed the permissions to 444. I am not sure what was going on with this site, but it was becoming a pain. This will work for now!

    Thank you for the reply.
     
    Tarheel, Jun 21, 2013 IP