Module: nagvis Branch: master Commit: 9833b8584f55c3b448d3966fbec0779a2a1503b5 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=9833b8584f55c3b448d3966fbec0779a2a1503b5
Author: Lars Michelsen <[email protected]> Date: Tue Aug 10 04:29:35 2010 +0200 Fixed redirection problem when port is not 80 --- share/config.php | 2 +- share/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/config.php b/share/config.php index 2a6a7b0..6e525ea 100644 --- a/share/config.php +++ b/share/config.php @@ -23,7 +23,7 @@ *****************************************************************************/ header("Location: ". ((isset($_SERVER["HTTPS"])) ? 'https://': 'http://') . $_SERVER['HTTP_HOST'] - . ((isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != '80') ? ':'.$_SERVER['SERVER_PORT']: '') + . ((isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != '80' && strpos($_SERVER['HTTP_HOST'], ':') === false) ? ':'.$_SERVER['SERVER_PORT']: '') . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/frontend/wui/index.php".(($_SERVER["QUERY_STRING"] != '') ? '?':'').$_SERVER["QUERY_STRING"]); ?> diff --git a/share/index.php b/share/index.php index d57cc6b..0bdb651 100644 --- a/share/index.php +++ b/share/index.php @@ -23,7 +23,7 @@ *****************************************************************************/ header("Location: ". ((isset($_SERVER["HTTPS"])) ? 'https://': 'http://') . $_SERVER['HTTP_HOST'] - . ((isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != '80') ? ':'.$_SERVER['SERVER_PORT']: '') + . ((isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != '80' && strpos($_SERVER['HTTP_HOST'], ':') === false) ? ':'.$_SERVER['SERVER_PORT']: '') . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/frontend/nagvis-js/index.php".(($_SERVER["QUERY_STRING"] != '') ? '?':'').$_SERVER["QUERY_STRING"]); ?> ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
