I’ve been thinking about future-proof ing URLs in Movable Type lately, and it seems like what is really missing is a migration tool.
Say all your MT archives are setup to use the default system, that relies on ID values, like:
And you want to move on to something like:
It’d be nice if there was a simple little perl script that could look at your MT post titles and figure out what your final urls would be, and then pull the post ID to create one giant text file listing where old pages were and what their new names are.
Basically, I want a script that can produce a .htaccess file on the fly. It can’t be that hard if this plugin had access to MT IDs and titles. It’s just a text file as output, which perl is perfect for. Is there already something out there like this that I’ve missed?
update: Brad Choate sent this as a possible fix:
Redirect 301 /archives/<$MTEntryID pad=”1″$>.html /weblog/<$MTEntryDate format=”%y/%m/%d”$>/<$MTEntryTitle dirify=”1″$>
Thanks Brad! I could just make this a new template, then move my archives around and load it up as the .htaccess file. Nice.