티스토리 뷰

IE(Internet Explorer)는 윈도우에 기본 탑재되어 편리한 웹 생활을 담당해주었던 인터넷 브라우저의 일종입니다.
하지만 윈도우 10이 발표되고 Edge Browser(엣지 브라우저)가 발표됨에 따라 IE의 지원은 끊겼습니다.
따라서 IE에 탑재된 Trident엔진은 CSS를 정확히 지원을 못하고, 예상치 못한 오류들을 보여주고 있습니다.
IE 사용자가 홈페이지 방문시 다른 브라우저로 접속하도록 안내하는 웹페이지를 보여주기 위해 제작된 코드 입니다


1. 그누보드5 / ie_redirect.html  파일 생성 업로드
<!doctype html>
<html>
<head>
<title>인터넷 익스플로러 접속 불가</title>
</head>

<body>
<div style="text-align:center; margin-top:100px; font-size:12px; line-height:28px;">인터넷 익스플로러 서비스가 종료되었습니다.<br>
크롬, 엣지, 파이어폭스, 사파리 등 브라우저를 이용해주세요</div>
</body>
</html>


2. 그누보드5 / extend / ie_redirect.extend.php  파일 생성후 업로드
<?php
if (!defined('_GNUBOARD_')) exit;

// Internet Explore 접속하면 안내 페이지로 이동
$msie_check_http_agent = $_SERVER["HTTP_USER_AGENT"];
if( strpos($msie_check_http_agent,"MSIE") !== false || strpos($msie_check_http_agent,"Trident") !== false ) {
    // explorer true
    echo("<script>location.replace('./ie_redirect.html');</script>");
}

댓글