function provision_get_base_url

7.x-3.x provision.inc provision_get_base_url()

Retrieve a base_url for the currently active site.

TODO: when we actually support HTTPS, do this correctly.

Related topics

3 calls to provision_get_base_url()
install_6.inc in platform/drupal/install_6.inc
Rebuild all the caches
install_7.inc in platform/drupal/install_7.inc
Rebuild all the caches
install_8.inc in platform/drupal/install_8.inc
Rebuild all the caches

File

./provision.inc, line 151
The provisioning framework API.

Code

function provision_get_base_url() {
  $base_url = 'http://' . d()->uri;

  $http_port = d()->server->http_port;
  if (!is_null($http_port) && ($http_port != 80)) {
    $base_url .= ':' . $http_port;
  }
  return $base_url;
}