MT to Wordpress redirects.
I used the following script to create a mod_rewrite file for my new Wordpress install. After running the script, the redirects look like this:
Redirect Permanent /ease/archives/001694.html http://www.poorbuthappy.com/ease/archives/2002/11/23/562/i-renamed-xfmlmanager-to-taxomita
Note the /562/ part. That’s different from the usual Wordpress URL’s.
The reason I had to write this script is that the existing scripts assume every item has a title. I have written a lot of my MT entries without title, so I can’t use the http://www.poorbuthappy.com/ease/archives/2002/11/23/i-renamed-xfmlmanager-to-taxomita style, because it assumes no two entries on the same day have the same title. Empty titles wouldn’t really work. It’s not a huge problem, but I tried to solve it anyway, by setting up a URL structure that incorporates the entry ID: (in the Wordpress admin, go to Options > Permalinks and use the following code)
/archives/%year%/%monthnum%/%day%/%post_id%/%postname%
This way every entry has a unique URL, even when it doesn’t have a title.
The script below isn’t particularly well developed, so you’ll need to know PHP to adjust it for your purposes. Enjoy.
View the script at http://www.poorbuthappy.com/ease/files/redirect.txt
July 22nd, 2004 at 6:49 pm
[...] ations Post — David @ 2:46 pm
Peter Van Dijck has posted code to use for forwarding MT entries to WP entries when your MT post URLs do not inc [...]
September 15th, 2007 at 4:35 pm
Hello, Nice blog posting about MT to Wordpress redirects.. I would have to agree with you on this one. I am going to look more into url redirection. This Saturday I have time.