Back Home

Open Designs

Community. Driven.

    • CommentAuthor4evrblu
    • CommentTimeJan 12th 2007 edited by 4evrblu on the 13th January 2007 at 13:24:00 EST
     
    I know this is a silly question, but several days ago Chris helped me come up with a solution for my htaccess 301 redirect. It now looks like this:

    # .htaccess Not Viewable
    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>

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

    # 301 Permanent Redirects
    Redirect 301 /body-buddy http://totalphysiqueonline.com/anatomy-chart/
    Redirect 301 /body-buddy/ http://totalphysiqueonline.com/anatomy-chart/


    The problem is, every morning when I wake up, the htaccess file has reverted back to this:


    # .htaccess Not Viewable
    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>

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



    As you can see, the redirects are missing.

    This is spooky. Of course, I have to upload the correct file all over again, which is a pain, but the larger issue is why it is happening.

    Unless I am a sleep-uploader, and I am sabotaging my own site in a zombie-like state, I sure as hell ain't doing it.

    What gives? Could the old htaccess file I still have on the site, called, .oldhtaccess be causing a problem? Could Wordpress be doing something to the htaccess file when I back it up? COuld GoDaddy servers be doing something to it? Could the Tooth Fairy be doing it?
    •  
      CommentAuthorSean
    • CommentTimeJan 12th 2007
     
    If I recall, WordPress does do some writing to the .htaccess file but it shouldn't remove stuff. It doesn't on mine.

    If you don't find your answer here, try the WordPress forums too.

    Good luck and let us know how it turns out.
    • CommentAuthorainslie
    • CommentTimeJan 12th 2007 edited by ainslie on the 12th January 2007 at 13:16:18 EST
     
    It seems strange for WordPress to change the.htaccess file without you modifying the settings.

    Have you tried putting your redirects before the beginning of the WordPress block? seems that things aren't altered before that.

    another thought, do you have any plug-ins that may affect your .htaccess file such as a custom homepage plug-in. I can't remember what it's called but there is definitely one that changes the contents of the.htaccess file.
    • CommentAuthor4evrblu
    • CommentTimeJan 12th 2007 edited by 4evrblu on the 12th January 2007 at 13:23:41 EST
     
    Well, so far all I have found at WP is this lil snippet:

    "Everything between the #BEGIN WordPress and #END WordPress are subject to deletion. Put your custom stuff outside of those directives and you should be fine."

    This was in response to someone who experienced a similar issue to mine. It was over a year old and unresolved.
    • CommentAuthorainslie
    • CommentTimeJan 12th 2007 edited by ainslie on the 12th January 2007 at 13:28:12 EST
     
    okay, that makes sense but where is your # End? It seems to be missing -- maybe that is why.

    Unless you haven't pasted the whole code that is.
    • CommentAuthor4evrblu
    • CommentTimeJan 12th 2007
     
    Hi Ainslie,

    I will try your suggestion.

    As for plugins, most of my plugins control links and categories. I have Bad Behavior and Adsense and Adhesive, and a couple of backup utilities.

    I do have a feedburner plugin and remember hearing something about a connection to it and the htaccess file, though for the life of me I can't recall the specifics.
    • CommentAuthor4evrblu
    • CommentTimeJan 12th 2007 edited by 4evrblu on the 12th January 2007 at 13:37:19 EST
     
    Ahhhhh.....its funny, but I just noticed that myself. Where the heck did that end go?? COuld it have been removed along with the other stuff or did it get deleted by accident when I changed the file.

    Hmmm

    I will add that code back and monitor what happens today. In the meantime I will keep poking around in WP community.
    • CommentAuthor4evrblu
    • CommentTimeJan 13th 2007
     
    As an update: I was able to shield the redirects from being overwritten bu moving up above the Wordpress directives. So, it seems to have resolved the issue.
    •  
      CommentAuthorSean
    • CommentTimeJan 13th 2007
     
    Thanks for following up. Glad it's worked out.