[development] Accommodating a second base_url

Daniel F. Kudwien news at unleashedmind.com
Thu Oct 29 23:27:31 UTC 2009

> So, I'm thinking I should just hook_init, and based on the 
> http request, alter $base_url if needed, and do a 
> variable_set that I later retrieve in the theme to alter (or 
> not) the background-image used as the top banner. Is this the 
> best approach?

Whatever you do, if you think you need to alter $base_url, then you are most
likely approaching your task at hand wrongly.

Drupal usually sets up $base_url correctly and you should not alter that
value.  If you need conditional settings per site, then you should look into
Drupal's multi-site support.


More information about the development mailing list