Preserving Movable Type Links; Using mod_rewrite properly

Posted by Doug on February 26, 2009
Technology

Saving your movable type permalinks when moving to Wordpress is as easy today as it was in 2004; just convert the underscores to dashes, make sure your permalink structure matches otherwise, and you’re done!

In testing this out, I have found great reverence for wordpress. If you request a page, and the URL isn’t quite right, it will actually figure it out and deliver the best guess. For example, on my old site, the following was a link:

www.dreich.info/blog/archives/2008/12/highbridge_jume.html

This is automatically redirected to:

www.dreich.info/2008/12/highbridge-jume

…which isn’t actually a page on my new site. Instead, wordpress corrects it to:

www.dreich.info/2008/12/highbridge-jumel-house-city-college-bike-ride/

and you get the right page! (Really: try googling jumel dreich.info and note what google gives as the link, and what it actually is. This will probably go away soon when google recrawls the site.)

In the course of futzing with the mod_rewrite, I found out why none of my rewrites ever work: you can’t have a leading slash on the URI. It isn’t there; your rule will never match anything.

2 Comments to Preserving Movable Type Links; Using mod_rewrite properly

Julia F
February 27, 2009

When I saw the facebook mention of your blog, I was expecting poems about feelings. This is much more respectable. :)

Doug
February 27, 2009

All the posts with poems are saved as drafts, should I ever need to boost my “misunderstood teenager” cred (fat chance).

Leave a comment

WP_Big_City