|
@@ -203,7 +203,7 @@
|
|
#
|
|
#
|
|
# http://www.myhost.com/squirrelmail/src/login.php
|
|
# http://www.myhost.com/squirrelmail/src/login.php
|
|
|
|
|
|
- global $PHP_SELF, $SERVER_NAME, $HTTPS, $HTTP_HOST;
|
|
|
|
|
|
+ global $PHP_SELF, $SERVER_NAME, $HTTPS, $HTTP_HOST, $HTTP_SERVER_VARS;
|
|
|
|
|
|
// Get the path
|
|
// Get the path
|
|
$path = substr($PHP_SELF, 0, strrpos($PHP_SELF, '/'));
|
|
$path = substr($PHP_SELF, 0, strrpos($PHP_SELF, '/'));
|
|
@@ -214,13 +214,19 @@
|
|
$proto = "https://";
|
|
$proto = "https://";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if ($HTTP_SERVER_VARS['SERVER_PORT']) {
|
|
|
|
+ if ($HTTP_SERVER_VARS['SERVER_PORT'] != 80) {
|
|
|
|
+ $port = ':' . $HTTP_SERVER_VARS['SERVER_PORT'];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
// Get the hostname from the Host header or server config.
|
|
// Get the hostname from the Host header or server config.
|
|
// Fallback is to omit the server name and use a relative URI,
|
|
// Fallback is to omit the server name and use a relative URI,
|
|
// although this is not RFC 2616 compliant.
|
|
// although this is not RFC 2616 compliant.
|
|
if(isset($HTTP_HOST) && !empty($HTTP_HOST)) {
|
|
if(isset($HTTP_HOST) && !empty($HTTP_HOST)) {
|
|
- $location = $proto . $HTTP_HOST . $path;
|
|
|
|
|
|
+ $location = $proto . $HTTP_HOST . $port . $path;
|
|
} else if(isset($SERVER_NAME) && !empty($SERVER_NAME)) {
|
|
} else if(isset($SERVER_NAME) && !empty($SERVER_NAME)) {
|
|
- $location = $proto . $SERVER_NAME . $path;
|
|
|
|
|
|
+ $location = $proto . $SERVER_NAME . $port . $path;
|
|
} else {
|
|
} else {
|
|
$location = $path;
|
|
$location = $path;
|
|
}
|
|
}
|