Returns the root url from which this request is executed.
The base URL never ends with a /.
This is similar to getBasePath(), except that it also includes the script filename (e.g. index.php) if one exists.
@api
string The raw url (i.e. not urldecoded)
public function getBaseUrl() {
if (null === $this->baseUrl) {
$this->baseUrl = $this
->prepareBaseUrl();
}
return $this->baseUrl;
}