The Permalink Matter

As of yet, I’ve not solved the permalink problem that inevitably arose when I migrated this site from my server at home to a hosting provider and switched from Movable Type to WordPress. The issue is finding the proper URL rewriting scheme so that permalinks of a prior form are transformed into URLs of the current form. If you know anything about this sort of issue, keep reading and see if you can hand me the solution.

Explaining the problem is pretty straightforward, but I’ve never been able to properly draft rewrite rules to make this sort of thing work.

The prior incarnation of this site in fact was two different incarnations, because at one point I opened up a new installation of MT and picked up fresh from there, in the process changing the URL scheme of my permalinks from the first version of the site. So, I have two different old-style permalinks for which I need rewrite rules.

/2005/Nov/popping_the_cherry

and

/2008/feb/14/speech-less/

The first form has the three-letter abbreviation for the month with the first letter capitalized, no day, and a post title separated by underscores. The second form has the three-letter abbreviation for the month without any capitalization, the day, and a post title separate by hyphens and terminated with a slash.

Each of these forms requires rewrite rules which will transform requests for them into the current form.

/2008/02/gate-645/

The current form has the number of the month, no day, and a post title separated by hyphens and terminated with a slash.

So, anyone want to take a crack at drafting the mod_rewrite rules I need to rewrite the two previous URL schemes into the current scheme, so when it passes off to WordPress it finds the page being requested at its new permalink?

Addendum: I should add that the relevant .htaccess file already has some mod_rewrite action.

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

It’s there because it’s what WordPress puts in there automatically to handle the URL scheme the site currently uses.

Leave a Reply

You must be logged in to post a comment.