Web Hosting Talk







View Full Version : Custom error page thru .htaccess works w/Netscape but not with IE.


jrichrds
11-16-2000, 06:43 AM
I placed this command in the .htaccess file so I could have a custom 404 error page.
ErrorDocument 404 /404.html

FOr some reason, it works when I use Netscape, but doesn't when I use IE 5.x. I just get the standard "HTTP 404 Not Found - The Page Cannot Be Found" IE message. Considering I'm more concerned with the custom error page working with IE than Netscape, does anyone know why this is happening?

This is on a Cobalt RaQ4r, .htaccess in root web folder.

GordonH
11-16-2000, 07:20 AM
Could you post your URL please so everyone can have a look at it.

As the .htaccess function is web server and not browser related you may just be needing to clear out the cache in IE.

Gordon

KDAWebServices
11-16-2000, 08:31 AM
The reason it doesn't work is because IE has got an option to display it's own error messages when a 404 etc. gets returned.

JTY
11-16-2000, 09:38 AM
I think the error pages IE gives, suck.

Duster
11-16-2000, 09:45 AM
The good news is that if the httpd.conf file is used to specify custom error pages, it will work in IE as well as Netscape.

Mbarb
11-16-2000, 10:25 PM
I think I remember that the error page needed to be over a cretin size before IE would display it. I think the size was some like 512 bytes or larger.

Jag
11-16-2000, 10:35 PM
the httpd.conf can be edited to give custom pages as Duster said, but that was obviously already done if Netscape returns the custom page. It is an issue on IE4 and later, if you use IE3 then it works like Netscape, i think there may be an option in /tools/internet options/advanced to make the pages work with IE, you could always write Microsoft and complain :) ...I have, along with contacting DI to see if they know of a work around

Greg
11-16-2000, 10:49 PM
Originally posted by Mbarb
I think I remember that the error page needed to be over a cretin size before IE would display it. I think the size was some like 512 bytes or larger.

Yes, I remember when i was hosted on OLM, my error pages didn't show up, the techs there told me the html page had to be a certain size in order for it to work.....wierd but true. I cannot remember the size it had to be though.

Wazeh
11-16-2000, 10:52 PM
To make IE display the error message you can do the following:

go to Tools | Internet Options

this would open the options window, click the Advanced tab
on top. you will see a long list of options. One of them says: show friendly HTTP errors messages. Make sure it's unchecked. click on Apply, then OK.

This should fix your problem. Those friendly messages weren't that friendly afterall :)

BC
11-16-2000, 11:01 PM
Ah! I didn't know about that friendly HTTP error option. Thanks for that - and I kept wondering why some custom pages I knew existed didn't.

Greg
11-16-2000, 11:03 PM
Wazeh, that would make his browser see his own 404-error page......I think he wants to make sure his visitors see the 404 he made, not just himself.

jrichrds
11-17-2000, 12:33 AM
Thanks for all the replies. :) mbarb and Greg were correct about it having to be larger than a certain size before IE will display the custom error page (for IE5/5.5 at least). Before, I had a tiny test 404.html file. But once I changed it to a larger html file, it shows up in IE instead of their own "friendly HTTP error" message.