diff --git a/inc/main.php b/inc/main.php index 4e59d3f..348969d 100755 --- a/inc/main.php +++ b/inc/main.php @@ -84,7 +84,7 @@ abstract class Main extends PhpObject $this->asContext['process_page'] = basename($sProcessPage); $sServerName = array_key_exists('SERVER_NAME', $_SERVER)?$_SERVER['SERVER_NAME']:$_SERVER['PWD']; - $sAppPath = 'http://'.str_replace('http://', '', $sServerName.dirname($_SERVER['SCRIPT_NAME'])); + $sAppPath = $_SERVER['REQUEST_SCHEME'].'://'.str_replace(array('http://', 'https://'), '', $sServerName.dirname($_SERVER['SCRIPT_NAME'])); $this->asContext['serv_name'] = $sAppPath.(mb_substr($sAppPath, -1)!='/'?'/':''); $this->setMasks();