[thelist] Sending 404 Header in ASP

Jonathon Thomas jthomas at firstnet.net.uk
Fri May 17 11:12:01 CDT 2002


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

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


More information about the thelist mailing list