Page 1 of 1

301 redirect or PHP redirect?

Posted: Sun Jan 21, 2007 6:05 pm
by blade_922
Hey guys,

I have been told this can be done in 2 ways either with the .htaccess file or via a PHP File redirecting the URL's.

Im using joomla cms and the URL's to the articles are:

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


Ok so im moving to wordpress and there the URL's are:

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


dd/mm/yy/ being the date month and year of article.


How on earth would i do this and redirect all the articles to the new location? I've been struggling to get this for days. Most people have said its best via PHP so as to read the article date, but i have no idea how.

Anyone help me out?

Regards

Posted: Mon Jan 22, 2007 3:47 pm
by Christopher
I think I might create a "pspnews/articletitle/index.php" script that redirects the old URLs to the new ones. For the mappings, you could use a big array if there aren't too many or create a database table from the two systems to hold the mappings.

Posted: Thu Jan 25, 2007 6:43 pm
by blade_922
I have no idea what that all means. Or how on earth to do it. Can you start me off with the code a little anyone :)

regards

Posted: Thu Jan 25, 2007 6:53 pm
by feyd
header() redirection.