Okay, I probably can’t avoid writing the obligatory migration article :) If in the migration process you decided to also change the domain name, then this article is for you. If your domain name is the same, only the hosting is different, then you should set up a CNAME. If you wiped Wordpress and installed Octopress in its stead, then this article is useless to you, move on.
We want to set up a good 301 redirect, such that will take links to old blog posts and redirect them to corresponding posts on the new domain. Redirection is good. It keeps search visitors happy (bots or humans).
We can implement it using mod_rewrite
. Wordpress already requires mod_rewrite
, so
we can count on its presence. Navigate to blog’s root and look for file named .htaccess
.
It should have this (or similar) content:
1 2 3 4 5 6 7 8 9 10 11 |
|
We don’t need all this, because we won’t be using Wordpress anymore. Replace it with this snippet
1 2 3 4 5 6 7 8 9 |
|
In short, these two rules take any URL from the old domain (with or without www
) and
replace domain name to a new one.
If your octopress blog is functioning on the new domain, no more actions are required. It should work already.