Archive for July 2011

Creating Your Own Google+ Short URL

Google+ profile URLs aren’t pretty or easy to remember, so I’ve created this URL to point to my Google+ profile: This is fairly easy to do if you have your own domain name and server (or webhost, e.g. DreamHost, HostGator).

Running Apache:

With Apache, you can just use mod_alias.

Check for this line to your httpd.conf file, and add if it is not there. If you do not know what the httpd.conf file is or can not access it, there’s a good chance that this is already there:

    LoadModule alias_module modules/

Then, all you need to do is create (or add to an existing one) a .htaccess file in your root web directory with this line, redirecting to your Google+ profile.

    Redirect /+

Running lighttpd:

First, you'll need to make sure mod_redirect is enabled under your server.modules in the lighttpd.conf file.

Then, if you have any other URL rewrite rules for a particular host, you will need to add this line to your url.rewrite section in your lighttpd virtual host config. This will tell lighttpd to ignore the rewrite rules for any URL beginning with +.

    "^/\+$" => "$0"

Finally, add a url.redirect rule for your host, pointing to your Google+ profile.

    url.redirect = (
        "^/\+$" => ""