경로 설정코드에서 HTTP_HOST 사용하도록 수정

This commit is contained in:
chicpro
2014-07-21 13:25:51 +09:00
parent 52dbc4b6e7
commit 25af73bee8

View File

@ -35,7 +35,7 @@ function g5_path()
$port = $_SERVER['SERVER_PORT'] != 80 ? ':'.$_SERVER['SERVER_PORT'] : '';
$http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 's' : '') . '://';
$user = str_replace(str_replace($document_root, '', $_SERVER['SCRIPT_FILENAME']), '', $_SERVER['SCRIPT_NAME']);
$result['url'] = $http.$_SERVER['SERVER_NAME'].$port.$user.$root;
$result['url'] = $http.$_SERVER['HTTP_HOST'].$port.$user.$root;
return $result;
}