• Resolved WWDay3

    (@wwday3)


    Hi. Sorry if this has been addressed, but I did a search and didn’t find anything. Maybe I used incorrect search terms, I don’t know.

    Anyway, twice now my .htaccess file, which I have added changes to, has automatically switched back to the default “out of the box” .htaccess. This happened once last week, and once this week. Fortunately, after last week’s fiasco, I made a backup copy and was able to easily recover.

    Questions – *why* is my .htaccess changing on me? *How* do I stop it from happening in the future?

    Thanks,
    Wally

Viewing 3 replies - 1 through 3 (of 3 total)
  • Is your .htaccess file writable (chmod 666)?
    Did you modify anything in your permalink settings?
    Did you create a new Page?
    Are your custom rules INSIDE the WordPress section of the .htaccess? (they shouldn’t be to avoid WP rewriting them)

    Thread Starter WWDay3

    (@wwday3)

    By “inside” do you mean between the #Begin WordPress and #End WordPress comments? Because if so, then yes they are. Here os the “original” WordPress file

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

    Where should my changes be?

    THanks

    Aha, I didn’t know I needed the #Begin WordPress and #End WordPress comments! (At least I’m assuming I do.) I’ve had a few sites where just saving a post added the code above even though I already had it in the .htaccess file, but I guess because WP didn’t see the comments, it didn’t “see” the code so wrote it again, breaking the file and breaking the site! I removed the duplicated code and all was well again. Whew. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘My htaccess is automatically changing?’ is closed to new replies.