[thelist] Sending 404 Header in ASP

Jonathan_A_McPherson at rl.gov Jonathan_A_McPherson at rl.gov
Fri May 17 11:26:00 CDT 2002


Tried this yet?

Response.Status = "404 Not Found"

Jon

-----Original Message-----
From: Jonathon Thomas [mailto:jthomas at firstnet.net.uk]
Sent: Friday, May 17, 2002 9:08 AM
To: thelist at lists.evolt.org
Subject: [thelist] Sending 404 Header in ASP


Hi

I've spent the last couple of months developing an ISAPI-driven ASP
website. The ISAPI filter sends every request to /default.asp and
rewrites the URL - it concatenates the requested path as a parameter to
the page. So, for example, http://www.sitename.com/info/stuff.asp
becomes http://www.sitename.com/default.asp?path=/info/stuff.asp

The default.asp page then checks in a site structure database to see if
the requested path exists and serves out the relevant content
accordingly.

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.

Thanks in advance for any suggestions

Jon



More information about the thelist mailing list