Need some .htaccess help

Happy New Year!

I’m closer than I thought I’d be in getting this blog switched over to the new WordPress version.

All I have to do is:

  • Set up the RSS feeds to point to my FeedBurner feeds – easy
  • Get all the posts imported – easy
  • Set the WordPress blog to publish to instead of – easy
  • Tweak some more plug-ins to make sure everything is doing what I want it to do. Tonight I got search working, as well as a contact form instead of a spam-catching email link – easy
  • Get all the redirects set up so any links to posts on this Movable Type blog point to the same posts on the new redone blog – ack

Old permalink format:


New permalink format:


I’ve decided to go with the more traditional WordPress format of putting a hyphen in between the words rather than an underscore. Some folks say it’s better for SEO. I don’t know. I think it looks better with the hyphens. I only had the “viewfromhome” directory because a few years back I had a host that wouldn’t let Movable Type write to the root directory. That’s not an issue now.

So any mod_rewrite, .htaccess or regular expression wizards care to lend me a hand with this? I understand the theory, I’m just lost on the execution. I need the rewrite rule to ignore the “viewfromhome” in the old link, ignore the “day” part in the new link, translate the post title to change the underscores to hyphens, and drop the .php on the end in favor of “/.” Easy, huh?

WordPress already takes care of hiding out the file name in the included .htaccess file:

# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]


# END WordPress

I just have to figure out how to do the rest.


2 responses to “Need some .htaccess help”

  1. I’m fairly certain you cannot do what you ask without at least re-importing your MT entries, including hacking both MT Export and WP Import to translate basename -> slug. I’m also fairly certain that you’d have to drop the “dd” part.

    The ONLY information .htaccess has is the URL. It doesn’t know about extra slug characters, nor does it know about extra data like “dd.”