The returned URL does not have an ending slash.
By default this value is based on the user request information. This method will
return the value of
$_SERVER['HTTP_HOST'] if it is available or
$_SERVER['SERVER_NAME'] if not.
You may want to check out the
PHP documentation
for more information on these variables.
You may explicitly specify it by setting the [[setHostInfo()|hostInfo]] property.
> Warning: Dependent on the server configuration this information may not be
> reliable and
may be faked by the user sending the HTTP request.
> If the webserver is configured to serve the same site independent of the value of
> the
Host header, this value is not reliable. In such situations you should either
> fix your webserver configuration or explicitly set the value by setting the [[setHostInfo()|hostInfo]] property.
> If you don't have access to the server configuration, you can setup
HostControl filter at
> application level in order to protect against such kind of attack.