[vox-tech] Apache, IE, error 404
Rod Roark
vox-tech@lists.lugod.org
Thu, 27 Jun 2002 10:17:38 -0700
Well, I just tried these two URLs on IE 5.0 after booting up
Win98 on my wife's (dual boot) machine. It seems to display
your stuff OK, regardless of the "friendly messages" setting.
-- Rod
http://www.sunsetsystems.com/
On Thursday 27 June 2002 09:29 am, nbs wrote:
> On Thu, Jun 27, 2002 at 07:22:28AM -0700, Rod Roark wrote:
> > >From Apache's default httpd.conf:
> >
> > # Customizable error response (Apache style)
> > # these come in three flavors
> > #
> > # 1) plain text
> > #ErrorDocument 500 "The server made a boo boo.
> > # n.b. the (") marks it as text, it does not get output
> > #
> > # 2) local redirects
> > #ErrorDocument 404 /missing.html
> > # to redirect to local URL /missing.html
> > #ErrorDocument 404 /cgi-bin/missing_handler.pl
> > # N.B.: You can redirect to a script or a document using
> > server-side-includes. #
> > # 3) external redirects
> > #ErrorDocument 402 http://some.other_server.com/subscription_info.htm=
l
> > # N.B.: Many of the environment variables associated with the origin=
al
> > # request will *not* be available to such a script.
> >
> > Looks like #2 is what you are mostly wanting.
>
> Maybe I'm missing something, but I don't think that will do it.
> In fact, that's what I already have. Using a non-IE browser, go to,
> for example:
>
> http://www.lugod.org/projects/installfests.shtml
>
> and, perhaps, compare it to:
>
> http://www.lugod.org/FooBar/
>
>
> So I've already got 404 errors doing magical PHP stuff. My issue is,
> they are (rightly) being transmitted as "404" responses.
>
> IE notices this, ignores any of the actual HTML content provided by
> the webserver (e.g., in the first page up there, the note saying
> "You're probably looking for the installfest page: _link_"), and just
> plops its crap onto the screen.
>
>
> I want Apache to say "Ok, this is a 404... BUT... the requester is usin=
g
> Internet Explorer, so I'll still show them the 404 error page Bill so
> tirelessly created, BUT I'll just say it's an "okeydokey" response, not
> a 404."
>
>
> I think someone's suggestion to rewrite headers using PHP might do the
> trick for me. If so, I'll post my solution.
>
>
> Now to track down a Windows box with IE to test with ;)
>
> -bill!