From 3a35351199e9b7f4748de6bc26ebe31893856c6e Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Sun, 27 Jul 2014 09:29:02 +0000 Subject: [PATCH] Remove the ports in baseURL if it is the standard port (80 for http, 443 for https) git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1577 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- route.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/route.php b/route.php index ab66c87..d8ca759 100644 --- a/route.php +++ b/route.php @@ -31,11 +31,11 @@ class route return $this->baseURL; if (!isset ($_SERVER["SERVER_PORT"])) - $_SERVER["SERVER_PORT"] = 80; + $_SERVER["SERVER_PORT"] = "80"; $port = ":".$_SERVER["SERVER_PORT"]; - if (!isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === 80) + if (!isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === "80") $port = ""; - if (isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === 443) + if (isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === "443") $port = ""; if (isset ($_SERVER["SCRIPT_NAME"])) @@ -84,11 +84,11 @@ class route else $url = "http:"; if (!isset ($_SERVER["SERVER_PORT"])) - $_SERVER["SERVER_PORT"] = 80; + $_SERVER["SERVER_PORT"] = "80"; $port = ":".$_SERVER["SERVER_PORT"]; - if (!isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === 80) + if (!isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === "80") $port = ""; - if (isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === 443) + if (isset ($_SERVER["HTTPS"]) && $_SERVER["SERVER_PORT"] === "443") $port = ""; if (isset ($_SERVER["SERVER_NAME"]))