Welcome to Julian Kuiters Saturday, October 20 2018 @ 07:52 PM AEDT

Multiple domain names, one geeklog

  • Contributed by:

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

I use multiple domain names here:
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