RewriteEngine On RewriteBase / # Rewrite rules to support move from MovableType to WordPress # Any URLs with up to five words separated by underscores, rewrite them as urls with hyphens: RewriteRule (200[6-9])/([0-9][0-9])/([a-z]+)_([a-z]+)\.html$ /$1/$2/$3-$4/ [R=301,L] RewriteRule (200[6-9])/([0-9][0-9])/([a-z]+)_([a-z]+)_([a-z]+)\.html$ /$1/$2/$3-$4-$5/ [R=301,L] RewriteRule (200[6-9])/([0-9][0-9])/([a-z]+)_([a-z]+)_([a-z]+)_([a-z]+)\.html$ /$1/$2/$3-$4-$5-$6/ [R=301,L] RewriteRule (200[6-9])/([0-9][0-9])/([a-z]+)_([a-z]+)_([a-z]+)_([a-z]+)_([a-z]+)\.html$ /$1/$2/$3-$4-$5-$6-$7/ [R=301,L] RewriteRule (200[6-9])/([0-9][0-9])/([a-z]+)_([a-z]+)_([a-z]+)_([a-z]+)_([a-z]+)_([a-z]+)\.html$ /$1/$2/$3-$4-$5-$6-$7-$8/ [R=301,L] # Any other URLs that end in .html, rewrite them to point to the archive pages. This is because of # how MovableType cuts off words on the 6th word in the URL. RewriteRule (200[6-9])/([0-9][0-9])/([a-z0-9_]+)\.html$ /$1/$2/ [R=301,L] RewriteRule atom.xml /feed [R=301,L] RewriteRule index.xml /feed [R=301,L] RewriteRule index.rdf /feed [R=301,L] RewriteRule rsd.xml /feed [R=301,L] # Any URLs that have the string 'mt' should just point to main site and remove any query strings RewriteCond %{QUERY_STRING} . RewriteRule mt/mt-(.+) /#searchform? [R=301,L,NE] # Rewrite rules to support pretty URLs in WordPress RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]