diff --git a/inc/toolbox.php b/inc/toolbox.php index 879a42b..a07027d 100755 --- a/inc/toolbox.php +++ b/inc/toolbox.php @@ -41,7 +41,7 @@ class ToolBox //Add Server Name $sServerName = array_key_exists('SERVER_NAME', $_SERVER)?$_SERVER['SERVER_NAME']:$_SERVER['PWD']; - $sAppPath = $_SERVER['REQUEST_SCHEME'].'://'.str_replace(array('http://', 'https://'), '', $sServerName.dirname($_SERVER['SCRIPT_NAME'])); + $sAppPath = 'http'.((isset($_SERVER['HTTPS']) && 'on' === $_SERVER['HTTPS'])?'s':'').'://'.str_replace(array('http://', 'https://'), '', $sServerName.dirname($_SERVER['SCRIPT_NAME'])); $_GET['serv_name'] = $sAppPath.(mb_substr($sAppPath, -1)!='/'?'/':''); }