Check your includes/constants.php if you set manualy the SCRIPT_URL make sure it has correct formating and no trailing slash at the end.
But I think something wrong in global.php...make sure you have this block of code:if (defined("SCRIPT_URL") && SCRIPT_URL != "") {
$script_url = SCRIPT_URL;
}
else {
$port = (!preg_match("/^(80|443)$/", getenv("SERVER_PORT"), $port_match)) ? ":".getenv("SERVER_PORT") : "";
$script_url = ($port_match[1] == 443) ? "https://" : "http://";
$script_url .= (!empty($HTTP_SERVER_VARS['HTTP_HOST'])) ? $HTTP_SERVER_VARS['HTTP_HOST'] : getenv("SERVER_NAME");
$script_url .= $port;
$script_url .= (dirname($PHP_SELF) != "/") ? dirname($PHP_SELF) : "";
}
If you do and its not altered, then try to add below that block this line:echo $script_url;
It should show you the site url on top of each page (dont worry about possible other error messages).
If it shows the correct url then the problem is somewhere between global.php and the code TheOracle showed...check if $script_url variable being altered somewhere...