// 특정 url https 로 돌림

                $ssl_protocol = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? TRUE : FALSE;


                $url = array();

                $url[] = '/Login';

             

                $is_https       = false;


                foreach ($url as $key => $item)

                {

                         if ($item==$_SERVER['REQUEST_URI'] || preg_match('#^' . $item . '(.+)$#', $_SERVER['REQUEST_URI'])==TRUE)

                         {

                                if ($ssl_protocol===FALSE)

                                {

                                        Header("Location: https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);

                                }

                                else

                                {

                                        $is_https       = true;

                                        break;

                                }

                        }

                }


                if ($is_https===false && $ssl_protocol===TRUE)

                {

                        Header("Location: http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);

                }

                                                

+ Recent posts