Classic asp response code

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

+6
source share
2 answers

Use Response Object:

Response.Status = "404 Not found" 
+9
source

Technically, 200 is an OK status code, not an error, but, nevertheless, the main idea is that you need to tell the Response thread to return 404 (not found) for the status code. Here is one way to do this.

0
source

Source: https://habr.com/ru/post/886736/


All Articles