<code>&lt;?php&lt;br />

require(‘wp-config.php’);<br /> header(‘Content-type: text/plain’);<br /> ?><br /> <MTEntries lastn="999999”><br /> Redirect Permanent /archives/<$MTArchiveDate format=”%Y/%m"$>/<MTArchiveFile><br /> http://www.mccartney.ie/wordpress/&lt;$MTArchiveDate format=”%Y/%m/%d"$>/<?php echo sanitize_title("<$MTEntryTitle$>"); ?></MTEntries>

<p align="left">
  This generates a file that us suitable for using as a <code>.htaccess</code> file, making Apache redirect requests for the old MT URIs to the new WordPress URIs. For the category links, I&#8217;ve just hand crafted the lines, I only had a couple of categories.

<p style="font-style: italic;" align="left">
  (In writing this post, I&#8217;ve discovered some of the problems with quoting PHP in a PHP based system, so I&#8217;ve started to read <a href="http://codex.wordpress.org/Writing_Code_in_Your_Posts" target="_blank">this</a> and promise to make the template above make sense soon, I also found <a href="http://www.coffee2code.com/archives/2005/03/29/plugin-preserve-code-formatting/" target="_blank">this</a>) <em><strong>Done.</strong></em>