Override configuration for interface (different ways for different hosts)

Hi all,

I am looking for some advice. I am trying to make a D5 implementation have 2 different behavior depending on the host.

if ($_SERVER['HTTP_HOST'] == 'www.host.org' || $_SERVER['HTTP_HOST'] == 'host.org'){
$conf['i18n_translation_links'] = 0;
}elseif($_SERVER['HTTP_HOST'] == 'admin.host.org'){
$conf['i18n_translation_links'] = 1;
}

Does this make sense? Is there a better way to accomplish this?

Thanks!

Login to post comments

Domain Access

gnat's picture
gnat - Sun, 2009-10-04 17:26

You should have a look at the Domain Access module:
http://drupal.org/project/domain

It allows for the idea of distinct sites, with a shared and separate data. The version for D5 works well, and holds up well in real use.


Thanks gnat, I'll check the

epiraces - Tue, 2009-10-06 18:01

Thanks gnat, I'll check the module. We have some code that deals with server/hosts config, and thought that a few lines of code may have less of an impact. I tired to sett this on settings.php but no real luck.


I think you better follow

Jose Reyero's picture
Jose Reyero - Sat, 2009-10-31 11:08

I think you better follow this approach, and set any variable you want for each site.

http://drupal.org/node/339381