February 1st, 2010 I merged several blogs into this one. I needed a way to redirect three major blogs here so I looked into the base way to do it. I found, for my purposes, it was through an .htaccess file. It was a step away from blogging design and a step toward the basic coding of migrating a website. Not particularly fun, but very satisfying.
First I had an .htaccess file for my two other main blogs and put it in their root directory. The effect of the file was to do this:
Post was: postcardsfromthefunnyfarm.com/crazy-quotes/
Redirect now is: damienriley.com/crazy-quotes/
As I saod, the usual blogging design that I love doing had little to do with this “nuts and bolts” migration stuff.
The .htaccess code I used came from this helpful page on 301 redirects. My current code modified from there looks like this:
Options -Indexes
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/gerryriley.com/$
RewriteCond %{REQUEST_URI} !^/music/$
RewriteCond %{REQUEST_URI} !^/images/$
RewriteCond %{REQUEST_URI} !^/rileycentral/$
RewriteCond %{REQUEST_URI} !^/sgallery/$
RewriteCond %{REQUEST_URI} !^/gallery/$
RewriteRule ^(.*)$ http://www.damienriley.com/$1 [R=301,L]
As you can see, this isn’t Wordpress coding. Still, after all was said and done and much testing, it worked!
I ran into a few snags. The most maddening of which was that my “Postcards” blog (over 2,000 posts and most popular blog) was originally set up in my server’s root directory. This caused every file or folder in that directory to be forwarded to my damienriley.com … this was really annoying.
I was able to remedy it by using “exception” statements and keeping certain directories from being forwarded. Once I did this I notice Google was starting to list my posts from my migrated blogs as living at the new blog. Woo hoo, that feels good. Now searches in google of site:http://www.postcardsfromthefunnyfarm.com or site:http://www.dynamitelessonplan.com return most of my old posts from those blogs and, when clicked, they redirect seamlessly to their new respective url at damienriley.com
.htaccess files are really not that complicated and if you are looking to migrate your blog somewhere, you should look into how they work. It’s miraculous. Oh, and by the way, I am so much happier running one blog instead of 5! ;) In week when the month ends I will report as usual the amount of money and popularity I gained through blogging. It should be interesting to see if the one did as good as the three main ones. Goes to show you a blogs design is just the icing on the cake of all you have to know as a blogger.