Getting IIS 6 program code with Classic ASP code

I searched and did not find a suitable answer.

I have a custom 404 page, which when triggered:

  • parses the requested URL for a specific string
  • checks the database for this value
  • inserts specific HTTP headers based on results returned from db

Depending on the condition, I will send it to the browser:

Response.AddHeader "Location", a_dynamic_url
Response.Status = "301 Moved"

When a particular row is found in my database, the client browser behaves as desired, loading the dynamic URL that I set in the location header.

Here is my problem ...

When a particular row is NOT FOUND in my database, I cannot set the status to “404 Not Found” and display custom HTML in the browser.

, . 404, HTML ( 200).

, HTTP Fox Firefox, /, URL- bit.ly(: "bit.ly/asdfasdf" ), 404, HTML - .

, IIS 6 ASP?

+3
1

"IE Friendly Errors" 512 , HTML , , HTML ( IE ) ?

http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx

+2
source

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


All Articles