I think I may have found a solution to this...
In
system/library/config.php I've changed:
Code: Select all
public function get($key) {
return (isset($this->data[$key]) ? $this->data[$key] : NULL);
}
to
Code: Select all
public function get($key) {
if ($key == 'config_template') {
if ($_SERVER['HTTP_HOST'] == 'example.com') {
$usetemplate = 'foo/template/';
} else {
$usetemplate = 'bar/template/';
}
return $usetemplate;
} else {
return (isset($this->data[$key]) ? $this->data[$key] : NULL);
}
}
where "foo" and "bar" and separate themes.
I also edited
/config.php to allow for two domains:
Code: Select all
// HTTP
if ($_SERVER['HTTP_HOST'] == 'example.com') {
define('HTTP_SERVER', 'http://example.com/');
define('HTTP_IMAGE', 'http://example.com/image/');
} else {
define('HTTP_SERVER', 'http://otherdomain.com/');
define('HTTP_IMAGE', 'http://otherdomain.com/image/');
}
Otherwise every link will be directed back to the original domain.
I haven't fully tested this, but so far it seems to be working and saves me from having to edit every single controller.