Annika Backstrom
in misc, on 23 April 2003. It is tagged and #Blogging.

Did you know that MovableType can create .htaccess files with rules for mod_rewrite? Very handy, when modifying archive URLs.


RewriteEngine on

<MTEntries lastn="99999">
RewriteRule ^archives/<$MTEntryID pad="1"$>.php ¬
       /archives/<$MTEntryDate format="%Y/%m/%d"$>/ ¬
       <$MTEntryTitle dirify="1"$>.php [R=301]

(Breaks added for readability.) Which produces this output:

RewriteEngine on

RewriteRule ^archives/000138.php ¬
       /archives/2003/04/23/flexibletype.php [R=301]
RewriteRule ^archives/000137.php ¬
       /archives/2003/04/22/tracking_comments.php [R=301]
RewriteRule ^archives/000135.php ¬
       /archives/2003/04/22/thin_client_update.php [R=301]

Here's text files for the .htaccess and template. Go forth and create persistent URIs.