LIGHTTPD: Google+ Redirection

Lately, I have seen a few personal sites that redirect /+ to the personal Google+ profile. I thought “What a good idea!”. Sadly, my quick search on Google itself only showed how to do it with Apache (see here for example). Since I am using lighttpd this obviously does not work for me.

So here is how to do it with lighttpd:

$HTTP["host"] =~ "(^|\.)krenger\.ch" {
        # Redirect /+ to Google+
        url.redirect = ( "^/\+" => "")

The result is something like this: