[development] Accommodating a second base_url

Daniel F. Kudwien news at unleashedmind.com
Fri Oct 30 02:40:26 UTC 2009


> I think everyone who responded subsequently is missing the 
> point that the change of $base_url was to address all the 
> places in the content, blocks, views, etc. that use $base_url 
> to build the url for something, not only for the banner. The 
> links, if the site is requested as 
> mydomain2.com/drupalsubdirectory have to all say that, and it 
> doesn't (in my experience) build the $base_url with a 
> subdirectory automatically. I didn't know it would change 
> based on the domain changing, which is good to find out, but 
> that doesn't solve the problem that it had to be set manually 
> in the first place because of the subdirectory, and that all 
> the links that use a full url have to use the requested domain.

$base_url contains the domain and the base path (the actual subdirectory).
Actually:

  $base_url = $base_root . $base_path;

(hence, why I linked to the actual conf_init() function that does it)

Drupal figures all of that automatically out for you.  If it doesn't, then
you have a serious problem in your server configuration.  Which in turn
would mean that you are working around an issue that normally does not
exist.

sun



More information about the development mailing list