From 179fa24c4a2bec479fb828d267915c35070920fe Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Fri, 28 Aug 2020 10:28:42 +0800 Subject: [PATCH] try IIS rewrite --- platform/Normal.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/Normal.php b/platform/Normal.php index e5e3d8e..64f7240 100644 --- a/platform/Normal.php +++ b/platform/Normal.php @@ -5,6 +5,7 @@ function getpath() $_SERVER['firstacceptlanguage'] = strtolower(splitfirst(splitfirst($_SERVER['HTTP_ACCEPT_LANGUAGE'],';')[0],',')[0]); if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR']; $_SERVER['base_path'] = path_format(substr($_SERVER['SCRIPT_NAME'], 0, -10) . '/'); + if (isset($_SERVER['UNENCODED_URL'])) $_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL']; $p = strpos($_SERVER['REQUEST_URI'],'?'); if ($p>0) $path = substr($_SERVER['REQUEST_URI'], 0, $p); else $path = $_SERVER['REQUEST_URI']; @@ -16,6 +17,7 @@ function getpath() function getGET() { + if (isset($_SERVER['UNENCODED_URL'])) $_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL']; $p = strpos($_SERVER['REQUEST_URI'],'?'); if ($p>0) { $getstr = substr($_SERVER['REQUEST_URI'], $p+1);