To transfer one folder by using 301 redirect

Discussion in 'HTML & Website Design' started by ainmohd, Feb 29, 2008.

  1. #1
    I need to transfer the content of one of the folders of X website to similarly named folder of Y website by implementing the 301 directive as follows:

    In the htaccess file:

    redirect 301 /folderA/ http://www.....net/folderA/

    There are about 5 sub-folders with more than 500 webpages

    Is it correct?

    Thanks.
     
    ainmohd, Feb 29, 2008 IP
  2. fsmedia

    fsmedia Prominent Member

    Messages:
    5,163
    Likes Received:
    262
    Best Answers:
    0
    Trophy Points:
    390
    #2
    Yup, that's the correct method.
     
    fsmedia, Feb 29, 2008 IP
  3. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It is correct if you are running Apache, IIS on the other hand doesnt use htaccess files
     
    AstarothSolutions, Feb 29, 2008 IP
  4. ainmohd

    ainmohd Peon

    Messages:
    1,515
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #4
    fsmedia & AstarothSolutions ,

    I really appreciate your posts.

    I'm running Apache (Hosgator.com).

    My further undestanding is that I don't have to list individual urls/webpages like:

    redirect 301 /folderA/a.htm http://www.....net/folderA/a.htm
    redirect 301 /folderA/b.htm http://www.....net/folderA/b.htm
    redirect 301 /folderA/c.htm http://www.....net/folderA/c.htm
    redirect 301 /folderA/d.htm http://www.....net/folderA/d.htm
    redirect 301 /folderA/e.htm http://www.....net/folderA/e.htm
    redirect 301 /folderA/f.htm http://www.....net/folderA/f.htm
    redirect 301 /folderA/g.htm http://www.....net/folderA/g.htm
    redirect 301 /folderA/h.htm http://www.....net/folderA/h.htm

    "redirect 301 /folderA/ http://www.....net/folderA/" would be able to redirect traffic
    to all the webpages in the folder and sub-folders.

    Reason for the redirection:

    Without realising it, one of my bigger websites is no longer allowed to place Google ads
    (my Adsense account still active) due to noncompliance with Adsense policies found
    on same of its webpages.

    The ones I was to redirect are in compliance. It would be a waste if those webpages
    (getting more 2,000 hits/day) are not published elsewhere.
     
    ainmohd, Feb 29, 2008 IP