File Types (33)
Internet Explorer (6)
ErrorDocument directive seems to be ignored
8 comments. Current rating: (3 votes). Leave comments and/ or rate it.
Question:In an implementation of an ACL, I've set up my custom error handling document in Apache's configuration file. The handler is actually a perl script which inspects the requested URL and then redirects to an appropriate other URL. (A customer who didn't pay for report
shall be redirected to
And so on. It works fine in Konqueror but Internet Explorer just displays its stupid You are not authorized to view this page page.
Answer:You've done everything as you should on the server side because obviously other browsers get the redirect. The reason for IE's behaviour is that with version 5, Microsoft decided that unless the custom handler returns at least 512 bytes of status document, the browser will rather display its default message.
Microsoft calls this a feature (which a user cannot disable): MSIE 5 'may' replace a site's own error messages with its in-built error pages. This occurs if the error page from the site is less than a particular size.
For most errors, this is 512 bytes. If the error page from the site is more than 512 bytes, MSIE 5 will display the site's error message, otherwise it will not display it.
For a few statuses (403, 405 and 410), the cut-off size is 256. The solution to this problem is to ensure that all error pages are greater than 512 bytes.
The solution is that you add a bunch of hidden text (white text on white background) at the end of your document. A great place to add some keywords for the search engines :-)