How to Remain Popular When Moving Your Blog

Posted on April 1st, 2007 in Uncategorized | No Comments »

Maintaining your permalink structure when moving between blog platforms is incredibly important. When I moved one of my blogs from Movable Type to WordPress, I decided to get rid of day of the /day/ directory and the trailing .php suffix, which WP doesn’t use by default. In doing so, I wanted to make sure that links from search engines and blogs continued to work.

I moved from:
www.example.com/archives/month/day/entryname.php

to:
www.example.com/archives/month/entryname/

The easiest way to do this was with the Apache server mod_rewrite module, which is installed by most web hosts by default. Unfortunately, figuring out the mod_rewrite code to do this in my .htaccess file was tough, the learning curve is incredibly steep. I asked around forums and the WordPress support site.

Here is the code to add to you .htaccess file. You may need to adjust for your specific situation.

RewriteEngine On
RewriteBase /

RewriteRule ^archives/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(.*)\.php$ http://example.com/archives/$1/$2/$4 [R,L]

RewriteCond %{REQUEST_URI} ^archives/.*$
RewriteCond %{REQUEST_URI} !^.+\.php.*$
RewriteRule .* – [L]

Additional mod_rewrite tips and tricks to make sure your killer Page Rank and SEO work doesn’t go down the drain when moving your blog.

Dear Lazyweb, Help With MT -> WP Url Redirects

Posted on December 13th, 2006 in Uncategorized | No Comments »

I have a blog that I moved from one host to another, and from Movable Type to WordPress. I just realized that posts that link to other posts on the new blog still use the url format from the old blog.

Clicking on a link like this breaks due to the new url format.

http://onlinedatingpost.com/archives/2005/12/20/vivox_the_next_big_thing_in_online_dating.php

I want to redirect to this:

http://onlinedatingpost.com/archives/2005/12/vivox_the_next_big_thing_in_online_dating/

What I don’t get is how to remove the day of the month. Removing .php suffix and adding the trailing slash is simple.

Anyone know how to do this?