protected function ApacheRequest::prepareBaseUrl

Prepares the base URL.

Return value

string

Overrides Request::prepareBaseUrl

1 call to ApacheRequest::prepareBaseUrl()
ApacheRequest::preparePathInfo in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ApacheRequest.php
Prepares the path info.

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ApacheRequest.php, line 32

Class

ApacheRequest
Request represents an HTTP request from an Apache server.

Namespace

Symfony\Component\HttpFoundation

Code

protected function prepareBaseUrl() {
  $baseUrl = $this->server
    ->get('SCRIPT_NAME');
  if (false === strpos($this->server
    ->get('REQUEST_URI'), $baseUrl)) {

    // assume mod_rewrite
    return rtrim(dirname($baseUrl), '/\\');
  }
  return $baseUrl;
}