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
This commit is contained in:
12
route.php
12
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"]))
|
||||
|
||||
Reference in New Issue
Block a user