/**
* @access rochas
* Note: Ports Control for Imperial Digital Limited
*/
if (isset($_SERVER['SERVER_PORT']))
{
$port = $_SERVER['SERVER_PORT'];
function route_r($path_r)
{
if (isset($_SERVER['PATH_INFO'])) $_SERVER['PATH_INFO'] = str_replace('api', $path_r, $_SERVER['PATH_INFO']);
if (isset($_SERVER['QUERY_STRING'])) $_SERVER['QUERY_STRING'] = str_replace('api', $path_r, $_SERVER['QUERY_STRING']);
if (isset($_SERVER['ORIG_PATH_INFO'])) $_SERVER['ORIG_PATH_INFO'] = str_replace('api', $path_r, $_SERVER['ORIG_PATH_INFO']);
if (isset($_SERVER['REQUEST_URI'])) $_SERVER['REQUEST_URI'] = str_replace('api', $path_r, $_SERVER['REQUEST_URI']);
}
if ($port == 3031) route_r('customer/api');
if ($port == 3032) route_r('manager/api');
if ($port == 3033) route_r('other/api');
if ($port == 3034) route_r('food/api');
}
아끕다.. https 때문에 다 소용없게 되어버림..
그래도, 자알~~ 배웠습니다.
'Programming > PHP' 카테고리의 다른 글
PHP Composer 설치 및 사용법 (0) | 2020.09.14 |
---|---|
IPFS API wrapper library in PHP (0) | 2020.08.07 |
PHP 이메일 주소 유효성 체크하기 (0) | 2018.01.15 |
mysqli::real_connect(): Headers and client library minor version mismatch. (0) | 2017.12.12 |
How to read a value from JSON using PHP? (0) | 2017.07.27 |
댓글