301 Redirect or Meta redirect or something?

Discussion in 'Programming' started by blade_922, Jan 16, 2007.

  1. #1
    Hi guys i have a major problem.

    Im switching CMS's and Need to forward all the pages. Alot rank high.

    The current URL of the pages are

    http://www.mysite.com/pspnews/articletitle/

    only thing that varies is the article title.

    Ok so now with my new CMS the articles are displayed as follows in the URL

    http://www.mysite.com/dd/mm/yy/articletitle/

    With the date month and year displayed in the URL.


    How can i redirect all pages from current URL to new URL? How would i get it to find out the date from the mysql database?

    I know its 301 redirects, or something like meta refresh that can be done with php.

    I have no idea about this. Anyone help me out :)

    Regards
     
    blade_922, Jan 16, 2007 IP
  2. sukantab

    sukantab Well-Known Member

    Messages:
    2,075
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    110
    #2
    In the current URL location: http://www.mysite.com/pspnews/articletitle/
    create an index.php file.
    in that file,
    connect to database
    do a sql query for the articleid or whatever your unique key is, get the date modified.
    convert the date to dd/mm/yy format and concatenate with the sitename and then concatenate the article title. You can fetch this also from the db.

    Save all these in a string and set the refresh url to the saved string.

    I can do this for you for $10 if you want.
     
    sukantab, Jan 18, 2007 IP
  3. blade_922

    blade_922 Well-Known Member

    Messages:
    396
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    110
    #3
    I PM'd you. PM me back.

    Or someone else wanna do it?
     
    blade_922, Jan 20, 2007 IP