gleasonomicon
gleasonomicon

Reputation: 1089

classic asp response code

We currently have a classic asp 404 error page. By default, it's returning a status code 200 error, and we want it to return a 404 error code. How do you set the status code for a page in classic asp (vbscript)?

Upvotes: 7

Views: 11529

Answers (2)

dawebber
dawebber

Reputation: 3553

Technically, 200 is a status code OK, not an error, but nevertheless, the basic idea is that you need to tell the Response stream to return 404 (Not found) for the status code. Here's one way to do that.

Upvotes: 1

driis
driis

Reputation: 164291

Use the Response object:

Response.Status = "404 Not found"

Upvotes: 11

Related Questions