Have old files redirect to new files?

Discussion in 'Site & Server Administration' started by PFCritics, Dec 27, 2005.

  1. #1
    I'm not familiar with this area of coding or what forum this should be in, but this looked the closest from what I could tell.

    Here is my issue: all of my news files used to be in the following format:

    http://www.pfcritics.com/news/TheNewsArticle.php
    http://www.pfcritics.com/news/TheNewsArticle2.php
    etc...

    Two months ago, I changed my news directory to news101 so that Google News could index my articles. So, my articles now look like:

    http://www.pfcritics.com/news101/TheNewsArticle.php
    http://www.pfcritics.com/news101/TheNewsArticle2.php
    etc...

    The problem is, Yahoo is still linking to all of my "news" locations(which now give 404 error pages) instead of the new, "news101" location.

    So, is there any way I can have it so if a user clicks on the link http://www.pfcritics.com/news/filenametheytriedtoaccess.php, that it will automatically take them to http://www.pfcritics.com/news101/filenametheytriedtoaccess.php?

    If not, then are there any other suggestions?

    Thanks, any help is appreciated :D
     
    PFCritics, Dec 27, 2005 IP
  2. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #2
    301 redirect in your .htaccess
     
    mdvaldosta, Dec 27, 2005 IP
  3. PFCritics

    PFCritics Peon

    Messages:
    107
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    PFCritics, Dec 27, 2005 IP