Whenever I try to set the $base_url in my settings.php file, the value is never used. Instead the the value that's used in all the links is the url used in the address bar. So, if I go to the site using localhost, all the links come up as localhost links instead of the domain I set. This is probably a good feature if base_url is left blank in the setting.php file, but I still need to be able to set the value I want.

CommentFileSizeAuthor
#1 offline_message.patch.txt844 bytesZen

Comments

Zen’s picture

Status: Active » Needs review
StatusFileSize
new844 bytes

Patch attached.

-K

Zen’s picture

Category: bug » support
Priority: Critical » Normal
Status: Needs review » Active

Ah it's been that kinda day :S Please diregard the last comment.

This is not a bug. Links in Drupal are all relative. $base_url is primarily used when used externally - for e-mails, aggregators etc. If you want to use a single install for different sites, look into the multi-site feature and access your site using the appropriate URL.

Else you can use absolute URLs everywhere :)

hth
-K

catch’s picture

Version: x.y.z » 4.7.x-dev
Status: Active » Closed (fixed)