Subdomain is a great module - I've sucessfully installed it on my Drupal 5 installation.
Indeed, each OG appears in it's own subdomain.

But how do I set a different front page for each subdomain?

e.g when the surfer types http://og1.example.com, node/201 is displayed,
and when the surfer goes to http://og2.example.com, node/202 is displayed.

Any idea?

Amnon

Comments

druvision’s picture

I add the code below to the setting.php file of the subdomain but drupal can't find the front page of the subdomain.

define ("MYPRIMARYSITE", "example.com");
if (isset($_SERVER['HTTP_HOST'])) {
  $domain = '.'. preg_replace('`^www.`', '', $_SERVER['HTTP_HOST']);
}
$firstpart = substr($domain, 0, strpos ($domain, '.'));
$conf = array();
if ($firstpart != 'example.com') {
  $conf['site_frontpage']="region/$firstpart";
}

BTW, setting $conf['site_frontpage']="front"; to change the front page on on-OG pages does work.

WHY?

The solver will be rewarded.

Thanks

Amnon