Multiple domain names, one geeklog

Monday, December 20 2004 @ 03:29 PM AEDT

Contributed by: Julian Kuiters

Geeklog (the software driving this site) requires you to set the home url in config.php.

I use multiple domain names here:
juliankuiters.id.au
julian-kuiters.id.au
synthesisone.com
so I wanted to configure geeklog to allow visitors to use the website through each of these domans.

Geeklogs default behaviour is to prefix the value of $_CONF['site_url'] from config.php to all the links it displays. With a hard coded domain set in $_CONF['site_url'], all your visitors will be refered to that domain, regardless of which one they first visit your site on.

Change $_CONF['site_url'] in your config.php to:

$_CONF['site_url'] = 'http://' . $_SERVER["HTTP_HOST"];
and you will find Geeklog now keeps your vistor on the same domain name as they started.

Of course, if you have geeklog in a subdirectory of your website root directory, you will need to append that to the end, something like:

$_CONF['site_url'] = 'http://' . $_SERVER["HTTP_HOST"] . '/geeklog';

Tokyoahead's forums also has some details on how to run multiple Geeklog sites with one backend directory: http://tokyoahead.com/main/article.php?story=20040223133540904

Comments (0)


Julian Kuiters
http://www.julian-kuiters.id.au/article.php/geeklog-multiple-domain-names