.htaccess 파일을 이용한 404 오류 페이지 만들기
페이지 정보
작성자 서방님 댓글 1건 조회 108회 작성일 13-03-07 09:50본문
1. 우선 404 오류 페이지로 뜰 페이지를 만듭니다.
1. (예. abcd.com/404.php)
2. .htaccess 파일 안에 아래와 같은 내용을 적습니다.
2. ErrorDocument 404 [페이지 주소]
3. [페이지 주소]는 http://.../404.php 이런 식으로 적습니다.
-------------------------------------------------------------------------------
아래 홈페이지에서 '.htaccess' 파일과 '.htpasswd' 파일(소스)을 간단하게 생성할 수 있습니다.
'Custom Error Pages'에 체크하시고 오른쪽에 연결할 페이지의 경로를 입력한 후 'Create It' 버튼을 클릭하면 됩니다.
1. .htaccess Tool'의 'Create It' 버튼을 클릭하셔야합니다..
http://www.clockwatchers.com/htaccess_tool.html
댓글목록
서방님님의 댓글
서방님 작성일<span style="FONT-FAMILY: Gulim">여기서 예를 들어 도메인이 abcd.com </span><br /><span style="FONT-FAMILY: Gulim">계정 아이디 abcd로 가장을 한다면~ </span><br /><span style="FONT-FAMILY: Gulim">가상호스트 설정 파일에서 자신의 도메인에 </span><br /><span style="FONT-FAMILY: Gulim">아래 내용중 빨강색 부분을 추가를 해주시면 됩니다.</span><br /><virtualhost><br /><span style="FONT-FAMILY: Gulim"><VirtualHost *:80></span><br /><span style="FONT-FAMILY: Gulim"> ServerAdmin </span><a href="mailto:webmaster@dummy-host.example.com" target="_blank"><font color="#0077ff"><span style="FONT-FAMILY: Gulim">webmaster@</span></font><font color="#000000"><span style="FONT-FAMILY: Gulim">abcd.com</span></font></a><br /><span style="FONT-FAMILY: Gulim"> documentRoot "/home/abcd/www" </span><font color="#2151ff"><span style="FONT-FAMILY: Gulim">← 웹폴더</span><br /></font><span style="FONT-FAMILY: Gulim"> ServerName abcd.com</span><br /><span style="FONT-FAMILY: Gulim"> ServerAlias </span><a href="http://www.ragezone.kr/" target="_blank"><font color="#0077ff"><span style="FONT-FAMILY: Gulim">www.</span></font><font color="#000000"><span style="FONT-FAMILY: Gulim">abcd.com</span></font></a><br /><span style="FONT-FAMILY: Gulim"> ErrorLog "logs/abcd.com-error_log"</span><br /><span style="FONT-FAMILY: Gulim"> CustomLog "logs/abcd.com-access_log" common</span><br /><span style="FONT-FAMILY: Gulim"> </span><font color="#e70c00"><span style="FONT-FAMILY: Gulim">Alias /error "/home/abcd/error" </span><font color="#2151ff"><span style="FONT-FAMILY: Gulim">← 나만의 오류 페이지 파일 위치 </span><font size="1"><span style="FONT-FAMILY: Gulim">(사용자 임이로 지정가능)</span></font></font><br /><span style="FONT-FAMILY: Gulim"> Errordocument 404 /error/404.html </span><font color="#2151ff"><span style="FONT-FAMILY: Gulim">← 404 오류시 출력되는 파일이름</span></font><br /><span style="FONT-FAMILY: Gulim"> <Directory "/home/abcd/error"></span><br /><span style="FONT-FAMILY: Gulim"> Options FollowSymLinks</span><br /><span style="FONT-FAMILY: Gulim"> AllowOverride FileInfo AuthConfig</span><br /><span style="FONT-FAMILY: Gulim"> </Directory></span><br /></font><span style="FONT-FAMILY: Gulim"></VirtualHost></span><br /><br /></virtualhost>