RE: Force Response Code?, Adrian Fitton, 12-11-2009It depends on the server, but try this
by Roger Harris, December 22, 2009 20:14 This should work with IIS (but make sure that there is no other output before this):
<% header "HTTP/1.1 404 Not found" %> <% header "" %>If that doesn't work, some servers will work with this:<% header "Status: 404 Not found" %> <% header "" %>Or, it apparently doesn't hurt to use both, with the HTTP first:<% header "HTTP/1.1 404 Not found" %> <% header "Status: 404 Not found" %> <% header "" %>IIS, at least, doesn't allow setting all of the possible HTTP response codes, but it does allow the "404 Not found" and "401 Unauthorized" which are the only two I've had a need for. I'm not sure about other servers.
Name E-mail optional TopicMessage:
HTTP Link: Link text: