Redirect from old CMS to new CMS?

Discussion in 'PHP' started by mitchbuch, Feb 17, 2012.

  1. #1
    Hi,

    Hopefully some of you have knowledge of this.

    On one of my sites I currently have a CMS system, where the "news" url's are e.g. like this: domain.com/category/index.php?id=37

    I am now moving to a new CMS system and will use more search friendly url's e.g. like this: domain.com/category/this-is-the-headline/37

    So, this is my question:

    Lots of people are linking to my old articles in this way: "domain.com/category/index.php?id=37" and I do not want to lose that traffic when I move to the new system. Is there a way that I can redirect the people who use the old url's to the new system and "new" url's?

    E.g. by using .htaccess? Is that a way to do it? is it possible at all?

    Would be great if you could help me with this.

    Thanks.
     
    mitchbuch, Feb 17, 2012 IP
  2. ker

    ker Peon

    Messages:
    97
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Can you give me your website (you can send me pm) to see exactly your link pattern. Also tell me what is your new cms and what was before...
     
    ker, Feb 17, 2012 IP
  3. mitchbuch

    mitchbuch Active Member

    Messages:
    131
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    The link pattern on the old site is, like I told above: domain.com/category/index.php?id=37

    To the new site it will be like this: domain.com/category/this-is-the-headline/37
     
    mitchbuch, Feb 17, 2012 IP
  4. Arttu

    Arttu Member

    Messages:
    139
    Likes Received:
    2
    Best Answers:
    8
    Trophy Points:
    40
    #4
    Since the new url has a title in it you can't do it simply with .htaccess.
    You could use .htaccess to redirect all the old links to a php file and then do a 301 redirect.

    E: Well actually you can do it with only .htaccess but then you would have two kind of urls.
     
    Last edited: Feb 17, 2012
    Arttu, Feb 17, 2012 IP