Gets the base URL

echo Http::getBaseUrl();

@return string
504481
public static function getBaseUrl() : string
    {
        $https = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://';

        return $https . rtrim(rtrim($_SERVER['HTTP_HOST'], '\\/') . dirname($_SERVER['PHP_SELF']), '\\/');
    }
423250
public function getBaseURL()
    {
        $base = Director::baseURL();

        // Prepend hostname for domain mode
        $domain = $this->getDomain();
        if ($domain) {
            $base = Controller::join_links($domain->Link(), $base);
        }

        // Determine if base suffix should be appended
        $append = true;
        if ($this->getIsDefault()) {
            // Apply config
            $append = !(bool) Config::inst()->get(FluentDirectorExtension::class, 'disable_default_prefix');
        }

        if ($append) {
            // Append locale url segment
            $base = Controller::join_links($base, $this->getURLSegment(), '/');
        }

        return $base;
    }
259012
protected static function generate_base_url()
	{
		$base_url = '';
		if(\Input::server('http_host'))
		{
			$base_url .= \Input::protocol().'://'.\Input::server('http_host');
		}
		if (\Input::server('script_name'))
		{
			$common = get_common_path(array(\Input::server('request_uri'), \Input::server('script_name')));
			$base_url .= $common;
		}

		// Add a slash if it is missing and return it
		return rtrim($base_url, '/').'/';
	}
412010
private function url()
    {
        if (isset($this->_options[self::ENTRY_BASEURL])) {
            return $this->_options[self::ENTRY_BASEURL];
        }

        // this is the fallback
        return Urls::URL_CURSOR;
    }
115603
public function getBaseUri()
    {
        return sprintf('%s%s'
            , $this->params['endpoint']
            , ! empty($this->id) ? '/' . $this->id : null
        );
    }
1041763
public function getBaseUrl()
    {
        $scheme = $this->getScheme();
        $authority = $this->getAuthority();
        $basePath = $this->getBasePath();

        if ($authority && substr($basePath, 0, 1) !== '/') {
            $basePath = $basePath . '/' . $basePath;
        }

        return ($scheme ? $scheme . ':' : '')
            . ($authority ? '//' . $authority : '')
            . rtrim($basePath, '/');
    }
990578
public function baseUrl()
    {
        if (!$this->baseUrl) {
            $this->baseUrl = $this->request->getScheme()
                . '://' . $this->request->getHttpHost();
        }
        return $this->baseUrl;
    }
458910
public function buildBaseUrl()
    {
        $domain = $this->request->getScheme() . '://' . $this->request->getHttpHost();

        $url = $this->request->getScriptName();

        // We only want to remove the first occurrence of our base path, and only if base path is valid
        if ($this->getBasePath()) {
            $basePathPos = strpos($url, $this->getBasePath());
            if ($basePathPos !== false) {
                $url = substr_replace($url, '', $basePathPos, strlen($this->getBasePath()));
            }
        }

        // And we want to remove the script name separately, since it's possible base path is empty
        $url = str_replace($this->getScriptName(), '', $url);

        $this->baseUrl = $domain . '/' . ltrim($url, '/');

        return $this;
    }
922344
public function getUrl()
    {
        $query = $this->getQueryString();
        return sprintf('%s://%s/%s/%s%s',
            $this->getScheme(),
            trim($this->getHost(), '/'),
            trim($this->config->getRootEndpoint(), '/'),
            $this->getEntityType(),
            empty($query) ? '' : sprintf('?%s', $query)
        );
    }
28065
public function getBaseUri()
    {
        $controller = $this;
        return preg_replace_callback('/:(\w+)/', function ($matches) use ($controller) {
            return $controller->routeData($matches[1]);
        }, $this->baseUri);
    }
563953
function getBaseUrl()
    {
        $filename       = $this->getServer()->get('SCRIPT_FILENAME', '');
        $scriptName     = $this->getServer()->get('SCRIPT_NAME');
        $phpSelf        = $this->getServer()->get('PHP_SELF');
        $origScriptName = $this->getServer()->get('ORIG_SCRIPT_NAME', false);

        if ($scriptName !== null && basename($scriptName) === $filename) {
            $baseUrl = $scriptName;
        } elseif ($phpSelf !== null && basename($phpSelf) === $filename) {
            $baseUrl = $phpSelf;
        } elseif ($origScriptName !== null && basename($origScriptName) === $filename) {
            // 1and1 shared hosting compatibility.
            $baseUrl = $origScriptName;
        } else {
            // Backtrack up the SCRIPT_FILENAME to find the portion
            // matching PHP_SELF.

            $baseUrl  = '/';
            $basename = basename($filename);
            if ($basename) {
                $path     = ($phpSelf ? trim($phpSelf, '/') : '');
                $baseUrl .= substr($path, 0, strpos($path, $basename)) . $basename;
            }
        }

        // Does the base URL have anything in common with the request URI?
        $requestUri = $this->getMessageObject()->getTarget();

        // Full base URL matches.
        if (0 === strpos($requestUri, $baseUrl))
            return $baseUrl;

        // Directory portion of base path matches.
        $baseDir = str_replace('\\', '/', dirname($baseUrl));
        if (0 === strpos($requestUri, $baseDir))
            return $baseDir;

        $truncatedRequestUri = $requestUri;

        if (false !== ($pos = strpos($requestUri, '?')))
            $truncatedRequestUri = substr($requestUri, 0, $pos);

        $basename = basename($baseUrl);

        // No match whatsoever
        if (empty($basename) || false === strpos($truncatedRequestUri, $basename))
            return '';

        // If using mod_rewrite or ISAPI_Rewrite strip the script filename
        // out of the base path. $pos !== 0 makes sure it is not matching a
        // value from PATH_INFO or QUERY_STRING.
        if (strlen($requestUri) >= strlen($baseUrl)
            && (false !== ($pos = strpos($requestUri, $baseUrl)) && $pos !== 0)
        ) {
            $baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl));
        }

        return $baseUrl;
    }
669706
public function getUrl()
    {
        $url = self::BASE_FNS_URL . $this->getUrlPath();

        if ($this->getHttpMethod() === self::HTTP_METHOD_GET) {
            $url .= '?' . http_build_query($this->getPayload());
        }

        return $url;
    }
505395
public function getUrl()
    {
		if ($this->isLink()) {
			if ($this->getParentServer()->id != $this->prototype->getParentServer()->id) {
				return $this->prototype->getFullUrl();
			}
			else {
				return $this->prototype->getUrl();
			}
		}
		else {
			if ($this->_url === FALSE) $this->fillPath();
			return $this->_url;
		}
    }
52707
public function getBasePath()
    {
        $base = $this->container->get('path.base') ? $this->container->get('path.base').'/' : '';
        $base = $this->unifySlashes($base);

        return $base;
    }
918305
public function getBasePath()
    {
        if ($this->basePath === null) {
            $this->setBasePath($this->detectBasePath());
        }

        return $this->basePath;
    }
431069
public function getEndpoint()
    {
        $basePath = $this->app['config']->get('api.base_path', self::DEFAULT_BASE_PATH);
        $basePath = $this->stripTrailingSlash($basePath);

        // determine the base URL for the API,
        // i.e. https://api.example.com/v1
        $urlBase = $this->app['config']->get('api.url');
        if ($urlBase) {
            $urlBase = $this->stripTrailingSlash($urlBase);
        } else {
            // no base URL was defined so we're going to generate one
            $urlBase = $this->app['base_url'];
            $urlBase = $this->stripTrailingSlash($urlBase).$basePath;
        }

        // get the requested path, strip any trailing '/'
        $path = $this->stripTrailingSlash($this->request->path());

        // strip out the base path (i.e. /api/v1) from the
        // requested path
        if ($basePath) {
            $path = str_replace($basePath, '', $path);
        }

        return $urlBase.$path;
    }
860353
public function getBaseUri()
    {
        if ($this->baseUri === null) {
            $this->baseUri = $this->detectBaseUri();
        }

        return $this->baseUri;
    }