I’m going to redirect http://blog.rootninja.com to the main site. I don’t know why I didn’t just do this in the first place. I’ve always left it over here on its own. But it’s all on the same Virtual private server. Anyway, this is really easy to do in lighttpd. First, redirect all “www.rootninja.com” traffic to “rootninja.com”, because that other page is useless.
$HTTP["host"] =~ “^www\.(.*)$” {
url.redirect = ( “^/(.*)” => “http://%1/$1″ )
}
And now to redirect the “blog” part.
$HTTP["host"] =~ “^blog\.rootninja\.com” {
url.redirect = ( “^/(.*)” => “http://rootninja.com/$1″ )
}
Oh and mod_redirect must be enabled for this to work. And now I just need to go edit the config and restart lighttpd.