My Octopress Blog

A blogging framework for hackers.

Redirecting Moveable Type URLs

Well, I read the different options that were posted on how to migrate the links, and I didn’t like any of them. I wasn’t really a fan of leaving my MoveableType installation on the server for X duration. So, I wrote my own solution that is easily applied to the WordPress installation in the form of a custom 404 page. The page is fairly simple. All it does is the following:

  • Tries to figure out what the title of the post is, or should be
  • Formats the title according to what WordPress wants it to be
  • Checks the database to see if a post by that name exists
  • If it does, it sends you there with a proper 301 redirect
  • If it doesn’t, it displays the standard error page
The nice thing about this technique is that you have full control over it, and since it’s part of the template, you can edit it quickly and easily without using FTP or SSH. I have attached the PHP file that I used here, and it is full of comments. Custom 404 Page for MoveableType Links I would love to hear any feedback or comments on how it can be improved… or even why it sucks.