简体   繁体   中英

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)?

使用Response对象:

Response.Status = "404 Not found"

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM