Heads up: Geeky stuff below.
WordPress is very easy to install on your own server if you have even the slightest knowledge of how a web server is put together. But getting those old Blogger-URLs to translate to the new URL scheme was hard work for a non-techy like me.
Here is how I did it – in case others have the same problem (actually, some do):
Redirecting the RSS feed
First of all I wanted the old URL to our RSS feed to work so loyal subscribers won’t have to re-subscribe to the feed. The old feed was published to silberbauer.dk/rss.xml but the new feed is to be found at silberbauer.dk/feed/.
I tried numerous ways of rewriting the URL with mod_rewrite – nothing worked. Somehow my rewrite-rules conflicted with the rewriting that WordPress does on it’s own to make pretty URLs.
Finally I asked my very (very) smart Creuna co-worker Guan, and he told me simply to use RedirectPermanent instead. It works like a charm:
RedirectPermanent /rss.xml http://silberbauer.dk/feed/ Even FeedDemon/Newsgator accepted the “301″ and continued looking for the feed at the new URL.
Making old Blogger URLs point to new WordPress posts.
Then, I decided to make old blogger-URLs redirect to the WordPress version of the posts. First, I sat up WordPress to generate pretty permalinks that look as much like the old blogger links as possible, e.g.:
Old Blogger generated permalink: http://www.silberbauer.dk/2007/04/that-warm-fuzzy-feeling-of-web-20.html
New permalink: http://silberbauer.dk/wp/2007/04/that-warm-fuzzy-feeling-of-web-20
As you’ll notice: Only the “/wp/” and the missing “.html” differentiates the new URL from the old one. So with RedirectMatch we can redirect the URL using regular expressions:
RedirectMatch permanent ^/200([0-9])/(.*).html$ http://silberbauer.dk/wp/200$1/$2
Archive URLs
In exactly the same way the old archive URLs are redirected to the new archives:
RedirectMatch permanent ^/200([0-9])\_([0-9][0-9])\_([0-9][0-9])_archive.html$ http://silberbauer.dk/wp/200$1/$2/
My .htaccess file now looks like this:
RedirectPermanent /rss.xml http://silberbauer.dk/feed/
RedirectPermanent /index.html http://silberbauer.dk/
RedirectPermanent /index.htm http://silberbauer.dk/
RedirectMatch permanent ^/200([0-9])/(.*).html$ http://silberbauer.dk/wp/200$1/$2
RedirectMatch permanent ^/200([0-9])\_([0-9][0-9])\_([0-9][0-9])_archive.html$ http://silberbauer.dk/wp/200$1/$2/
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress