Ridiculously Simple 301 .htaccess Redirect Problem!

Discussion in 'Site & Server Administration' started by timothius, Jun 28, 2013.

  1. #1
    I've had my .htaccess file work perfectly for years on my GoDaddy Linux hosting. I've made no changes, but just a few hours ago I discovered that all my redirects are creating 404 errors in my browser.

    So I reduced my .htaccess file to it's most basic format and I can't even get this working:

    Options +FollowSymlinks
    RewriteEngine On
    RewriteCond %{http_host} ^mydomain.com [NC]
    RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]
    #
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/
    RewriteRule ^(.*)index\.html$ http://www.mydomain.com/$1 [R=301,L]
    #
    Redirect 301 /about.html http://www.google.com
    Code (markup):
    When I got to www.mydomain.com/about.html, it will not redirect to www.google.com.

    I've tried so many different things, I'm at a loss. Any help would be appreciated!
     
    timothius, Jun 28, 2013 IP
  2. timothius

    timothius Active Member

    Messages:
    136
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #2
    Unbelievable. After 4~ hours on the phone we found the problem.

    The geeks at GoDaddy messed up big time likely at the time when they migrated their servers to Apache 2.4 in the last month.

    On their grid hosting plan you now have to specify the folder your website is located in, when you make a relative path. Unbelievable. One day you wake up and everything that all the websites that were working for 5 years are broken. No notification, no warning. Thousands of dollars down the drain.

    So now

    Redirect /path.html http://example.com/correctpath.html
    Code (markup):
    must to be written like this:

    Redirect /foldername/path.html http://example.com/correctpath.html
    Code (markup):
    <sigh>Now that I changed all my redirects, I'll have to constantly test that they don't change it all back the way it was.</sigh> Not impressed GoDaddy... not impressed.
     
    timothius, Jun 29, 2013 IP
  3. arwen54

    arwen54 Active Member

    Messages:
    632
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Never ever ever get web hosting from GoDaddy - their hosting is horrendous. After 13 years with them - I'm slowly migrating all my domain registrations away from them too - because of some of their policy changes and their stand on certain issues that I won't get into here

    what a pain about all your re-directs - I would monitor the site regularly just in case they pull some other stunt on you.
     
    Last edited: Jul 4, 2013
    arwen54, Jul 4, 2013 IP