DelphiFAQ Home Search:

ErrorDocument directive seems to be ignored

 

comments8 comments. Current rating: 3 stars (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

/reports/classified/secret_credit_application_tricks.pdf

shall be redirected to

/reports/public/secret_credit_application_tricks.pdf

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 :-)


Comments:

2014-04-10, 07:38:00
anonymous from Lebanon  
rating
you are a genius man!! ive been searching for that for hours!!! and actually this is still used in IE9! Thanks a lot!!
2018-04-28, 02:50:58
anonymous from Indonesia  
Syukur allhamdulillah berkat bantuan angka togel NYAI RONGGENG yang NYAI berikan sama saya kemaring NUMBER MAGNUM 4D tuk putaran MALAYSIA ternyata tembus 100% dan alhasil saya menang sebanyak Rp 210 juta dalam 7 bandar togel yang ada di sini NYAI RONGGENG dan insya allah besok saya akan transanper uang sebanyak 35 juta ke nomor rekening NYAI sebagai tanda ucapan terima kasih saya sama NYAI karna bantuan ANGKA TOGEL NYAI saya bisa melunasih semua hutang-hutang istri saya di RENTENIR letaknya di kampung saya NYAI di WONOSOBO dan allhamdulillah juga NYAI saya sudah punya modal untuk membiayai ke 2 anak saya tuk lanjutkan kulianya yang sudah 2 tahun nganggur karna keterbatasan masalah ekonomi,sekali lagi saya ucapkan terimakasih banyak NYAI tas bantuannya sama saya,jadi kalau anda kepengen sukses sama seperti saya silahkan hubungi NYAI RONGGENG di number 085286344499 ingat tampah berusaha kita tidak akan mendapatkan hasilnya,terimakasih.

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: