1. index파일의 확장자는 .php로 바꾼다.
(서버에서 .html 도 php를 인식할수 있도록 세팅되어있으면 따로 바꿀 필요 없음 ㅎㅎ)
(서버에서 .html 도 php를 인식할수 있도록 세팅되어있으면 따로 바꿀 필요 없음 ㅎㅎ)
2. 제일 상단에 다음 코드를 넣습니다.
<?
$host_name = $HTTP_HOST;
if($host_name == "bibaram.pe.kr") header("Location:http://www.bibaram.pe.kr");
?>
$host_name = $HTTP_HOST;
if($host_name == "bibaram.pe.kr") header("Location:http://www.bibaram.pe.kr");
?>
그럼 bibaram.pe.kr 로 접속하면
www.bibaram.pe.kr 로 리다이렉션
bibaram