Custom 404, NS4, css bug

by Dave Alders <yldman(at)sierra.net>

 Date:  Mon, 27 Nov 2000 13:10:11 +0000
 To:  hwg-techniques(at)hwg.org
  todo: View Thread, Original
Here's a weird bug I've found using Netscape 4.08 and a
custom 404 Not Found page...

Using an ErrorDocument directive with a relative link pointing
to a document with a linked stylesheet using a relative link
causes an infinite loop if the page requested/not found is
not in the same directory as the error document. I think this is
because NS4 tries to link the stylesheet using the path relative to
the *referring* document's, not the document called by the
ErrorDocument directive. Since it can't find the stylesheet there,
it generates another 404, and you're now stuck in the loop.

Using an *absolute* path in either the link rel="stylesheet" href
or in the ErrorDocument statement solves the problem. I guess
you could use inline styles, too.

NS6 produces the custom page but doesn't use the stylesheet
(presumably it tries to find it in the wrong path, too) and IE 5.5
uses it's own internal 404, even though the custom page is
large enough where it should default to it (perhaps it senses
something is wrong and so defaults to it's internal page).

I haven't seen this documented anywhere. It seems like a
fairly easy kind of thing to have happen, though. And ugly.
Any Apache guru's run across this before?

HTH somebody someday...  :-)

Dave

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA