Why sometimes we cannot see the custom errors in IE ?
By Wing-Yip Walter Lee on Sep 24, 2008
Sometimes, you have configured the web server to return custom errors, e.g. in obj.conf,
Error fn="send-error" code="404" path="<path>/error404.html"
Error fn="send-error" code="401" path="<path>/error401.html"
Error fn="send-error" code="403" path="<path>/error403.html"
Error fn="send-error" code="405" path="<path>/error405.html"
Error fn="send-error" code="500" path="<path>/error500.html"
But you can see the above custom error pages ok in Firefox and telnet test,
apple:> telnet localhost 61801
Connected to localhost.
Escape character is '\^]'.
GET /nono1.html HTTP/1.1
HTTP/1.1 404 Not found
Date: Wed, 16 Jan 2008 10:02:35 GMT
this is a customer error page, crowded.html
But you will see IE showing its standard error, e.g.
But not the custom error page, why ?
This can be because of the IE option "Show friendly HTTP error messages" in the Advanced tab in Internet Options.
This will force the IE to show its friendly HTTP error messages in 404, 401, 500 status code, instead of the custom errors sent out by web server. This is why you can see the custom error ok in Firefox and telnet test, but not in IE sometimes. If you uncheck this option, then restart IE, then you can see the custom error page in response to a 404 Not Found.
If you really want your custom error page shown in IE, then one possible workaround (although I do not recommend, because changing status code is not a good idea/practice in general).
You can add this below in obj.conf to change from , e.g. 404 to 306 which is unused.
10.3.7 306 (Unused)
The 306 status code was used in a previous version of the specification, is no longer used, and the code is reserved.
Service method="TRACE" fn="service-trace"
Output fn="set-variable" error="306 Not Found" noaction="true"
Error fn="send-error" path="/export/home/iws6.1sp8/docs2/crowded.html"
Then, IE can see the new custom error page because now we change its status from 404 to 306. IE does not have a friendly error page for 306, so it will show our custom error page now. However, I have to say again - I do not recommend this. It is shown here just in case you really need to workaround this IE option to show your custom error page.