htaccess (301 redirects go to odd location)

Discussion in 'Search Engine Optimization' started by mokimofiki, Jul 3, 2012.

  1. #1
    Currently I have created an htaccess for a domain and simply have the rewriteengine on and 301 redirects. Example below:
    
    RewriteEngine on
    
    redirect 301 /index.html http://www.embassysuitesconcord.com/spa-botanica/
    redirect 301 / http://www.embassysuitesconcord.com/spa-botanica/
    redirect 301 /spa-botanica-services.php http://www.embassysuitesconcord.com/spa-botanica/services/
    redirect 301 /spa-botanica-packages.php http://www.embassysuitesconcord.com/spa-botanica/spa-journeys-specials/
    
    Code (markup):
    This being said this is what is happening:
    when going to the page "/spa-botanica-packages.php" I am being redirected to "http://www.embassysuitesconcord.com/spa-botanica/spa-botanica-packages.php" instead of "http://www.embassysuitesconcord.com/spa-botanica/spa-journeys-specials/" like it should be.

    Any thoughts would be appreciated, i'm beginning to think I have just been looking at it too long and its something simple.

    Thank you in advance :)
     
    mokimofiki, Jul 3, 2012 IP
  2. atxsurf

    atxsurf Peon

    Messages:
    2,394
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    0
    #2
    your
    redirect 301 / hxxp://www.embassysuitesconcord.com/spa-botanica/
    says:
    "redirect everything that starts with / to hxxp://www.embassysuitesconcord.com/spa-botanica/", for example /foo.txt to hxxp://www.embassysuitesconcord.com/spa-botanica/foo.txt
    your other redirects just don't have a chance to fire
    I think if you move it down to the last line, that should do it
     
    atxsurf, Jul 3, 2012 IP
    mokimofiki likes this.
  3. mokimofiki

    mokimofiki Well-Known Member

    Messages:
    444
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Thank you so much that did it. +rep
     
    mokimofiki, Jul 3, 2012 IP