How to redirect old URL to Movable Type 3.x new archive filenames

Movable type 2.x used to, by default, use numeric file names for individual entry archive files. There is a plug in that change that behaviour to use a text file name created from the title of the entry. With Movabletype 3.x, the new style naming is the default.

But what if your old site and file names are referenced and indexed by all the search engines? What if your site is so popular that there are a lot of external links pointing to the old file names? Even if you keep the old files around, they will not be updated if you ever update the entries after switching to the new and better naming system.

I have a solution for you. The following "template" will generate a list of redirect command for the Apache web server to tell any visitors going to the old file names to move to the new ones. This should speed up search engine indexing, and make sure that they are all pointing to the new files.

<MTArchiveList><MTEntries>
redirect permanent /loft/archives/<$MTEntryID pad="1"$>.html <$MTEntryPermalink$>
</MTEntries></MTArchiveList>

Change the directory name "/loft/archives" to wherever is your archive directory and put this into an index template, rebuild it once, and put the output into your Apache configuration file. If you do not have full access to your main config file, you can also put it in your .htaccess file, but it will be a little slower.

Have fun !