• Everytime I change the permalinks structure it erases the content in the htaccess file and I can’t login and the site give an error message that says “The page isn’t redirecting properly”. I have asked my hosting company 5 times to look into this and they can’t seem to fix it. Any help you could provide would really be appreciated.
    Thanks,
    M

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Mike,

    I take it you have your own important stuff in the .htaccess file. So why not set all the writing rights to zero.
    But for any non default permalinks setting WordPress needs some own rules in the /.htaccess. It will always try to write to the file. When that fails, WP warns you and supplies the needed code in the bottom of the screen. You can then copy that manually into your .htaccess file.

    Hi,

    Set your desired permalink and add this code in htaccess:

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    ErrorDocument 404 /index.php?error=404
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Thanks,

    Shane G.

    I generally always have other stuff in the .htaccess file.

    The trick is not to put the other stuff in between the #BEGIN and #END comments.

    At least, that’s how it’s worked for me.

    Yup, DianeV beat me to it. Make sure your custom stuff isn’t between the BEGIN and END tags.

    Thread Starter mikehays

    (@mikehays)

    Thank you all for you responses. Let me give you an update. I spent a total of 4 hours on the phone in 3 different sessions with my hosting company, Hostgator. For the most part they were really good to deal with. I think we figured out the problem. There was a strange redirect that somehow got placed into the c-panel which was conflicting with the site url. I was unable to remove this via the c-panel and had to have this escalated to a higher authority in Hostgator. They have removed the unknown redirect and now the blog seems to be operating fine. I have no idea how the redirect got there. So now i can multiple changes without any problems. Thanks again.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘change permalink and htaccess content erased’ is closed to new replies.