404 Not Found 페이지 표시하기
전산
2007/02/26 23:16
404 Not Found 페이지를 커스터마이징 해보려 했는데 뜻대로 되지 않았다. Firefox 에서는 잘 되는것이 IE 에선 내장 에러 페이지가 표시되는거다. 참고로 포털을 예로 들자면 Google 같은 경우 커스터마이징된 에러 페이지 ( http://www.google.com/fwefwe ) 가 표시되는 반면 네이버는 IE 내장 에러 페이지가 표시된다. ( http://www.naver.com/fwefwe ). 어떤건 되고 어떤건 안되고.. 대체 이유가 무엇일까 구글질을 해보고 아래 사이트를 찾아내었다.
http://www.yourwebsite.com/foldername/404.html
결론은 웹페이지가 512 byte 이하일 경우 IE 는 내장 에러 페이지를 표시해 버린다는것. 해서 어떻게든 페이지의 분량을 늘이면 된다. 간단히 위의 HTML 주석을 긁어다 붙이면 되는 것이었다. 그런데 저 주석 내용을 보시라. "IIS always returns error messages that are long enough to make Internet Explorer happy." 도 재미있지만 512 bytes 대신 "over the five hundred and twelve bytes minimum." 라고 써주는 센스..! 난 이런 양키 유머가 너무 좋다. 후후후
여튼 그래서 만들어진 Testors.Net 의 404 Not Found 페이지는 다음과 같다.
http://testors.net/missing.html
덧. 검색중에 이런 재미난 페이지 도 찾았다. 역시 구글.. -.-
http://www.yourwebsite.com/foldername/404.html
<!-- - Unfortunately, Microsoft has added a clever new - "feature" to Internet Explorer. If the text of - an error's message is "too small", specifically - less than 512 bytes, Internet Explorer returns - its own error message. You can turn that off, - but it's pretty tricky to find switch called - "smart error messages". That means, of course, - that short error messages are censored by default. - IIS always returns error messages that are long - enough to make Internet Explorer happy. The - workaround is pretty simple: pad the error - message with a big comment like this to push it - over the five hundred and twelve bytes minimum. - Of course, that's exactly what you're reading - right now. -->
결론은 웹페이지가 512 byte 이하일 경우 IE 는 내장 에러 페이지를 표시해 버린다는것. 해서 어떻게든 페이지의 분량을 늘이면 된다. 간단히 위의 HTML 주석을 긁어다 붙이면 되는 것이었다. 그런데 저 주석 내용을 보시라. "IIS always returns error messages that are long enough to make Internet Explorer happy." 도 재미있지만 512 bytes 대신 "over the five hundred and twelve bytes minimum." 라고 써주는 센스..! 난 이런 양키 유머가 너무 좋다. 후후후
여튼 그래서 만들어진 Testors.Net 의 404 Not Found 페이지는 다음과 같다.
http://testors.net/missing.html
덧. 검색중에 이런 재미난 페이지 도 찾았다. 역시 구글.. -.-







Textcube 1.8.5 : Accelerando