htaccess directory redirection

Discussion in 'Search Engine Optimization' started by panerai, Dec 8, 2007.

  1. #1
    I have a question about directory redirection with htaccess

    I have these lines

    redirect 301 /dog/cat/ http://www.domain.com/animals/
    Code (markup):
    The redirect works fine, but the link on the browser looks like this

    http://www.domain.com/animals/cat-bowl.html?/dog/cat/cat-bowl.html
    Code (markup):
    Will this be the link the search engine index? or will the search engines know that only files within the old directories should be perm 301 moved to the new directory

    Thanks
     
    panerai, Dec 8, 2007 IP
  2. Jean-Luc

    Jean-Luc Peon

    Messages:
    601
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Search engines will index the link as it appears in your browser.:confused:

    Your .htaccess is good; it redirects /dog/cat/cat-bowl.html to http://www.domain.com/animals/cat-bowl.html. I don't know from where the other characters are coming. Weird...

    Jean-Luc
     
    Jean-Luc, Dec 8, 2007 IP