I had to do this recently to one of my blog sites. Simply add this to your .htaccess file for every post your want redireceted. Easy stuff.
redirect 301 /2006/12/18/postname/ http://www.example.com/category/postname/
Here the old post URL,
http://www.example.com/2006/12/18/postname/
will be redirected to new URL,
http://www.example.com/category/postname/
Note that in the definition, first part is the old URL without domain name and the second part is complete new URL. Keep whole definition in one line (Don’t include line brakes using Enter button). Also note where to apply spaces (There is a space between old URL and new URL).
Easy stuff I know, but this text file was taking up space on my desktop and I needed to get rid of it. Why not add it to the blog for me and you later and trash the text file. Cheers!
Leave a Reply
Be the First to Comment!