The Progress Bar

Connecting the threads between emerging technology, media, identity, progress and bars

How to Remain Popular When Moving Your Blog

April 1st, 2007 ·

The Progress Bar read by people interested in emerging Internet marketing, technology, social media, reputation, virtual environments, blogs, the Boston Internet scene and much more. If you like what you see you should subscribe to my RSS feed or via email in the sidebar. Thanks for visiting!

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.

Tags: - - - Blog reactions

Related Posts