[thelist] Sending 404 Header in ASP
Anne Thorniley
anne at beerintheevening.com
Fri May 17 11:17:01 CDT 2002
Hi Jon,
On Fri, May 17, 2002 at 05:08:08PM +0100, Jonathon Thomas wrote:
> The problem I'm having is that I'm unable to handle requests for
> non-existent pages correctly. Although my default.asp is able to output
> something like "page not found", I can't work out how to actually send a
> "404 Not Found" status/header to the client. Currently, every request
> serves a standard "200 OK" status which is obviously not what I want.
Sounds like the server is sending back exactly what it should do - the
browsers requests /default.asp which exists, so it sends back a 200.
I'm not an expert on IIS but how about redirecting to a page that doesn't
exist if someone requests a non-existant page? That will mean the server
sends back a 302 for the redirect, and then a 404 for the page it tries
to redirect to. Not perfect, but better than a 200?
Just an idea.
Anne
--
But if I find you and I
Really meant that last goodbye,
Then I'm gonna laugh so hard,
I'll cry.
More information about the thelist
mailing list