response.Addheader not working anymore
i have a page for 404 error and the response.status is 404 yesterday the response.Addheader was working fine but today it is just showing a blank page and if i check the header status it is 404.
here is part of my code
Response.Status="404 Not Found"
Response.AddHeader "Location", doma开发者_如何学运维in & "/page-not-found"
in the same code - the 301 status works fine
IIS 7, vb script, classic asp
You could edit your web.config to redirect to there on 404...
<configuration>
<system.web>
<customErrors defaultRedirect="/page-not-found"
mode="RemoteOnly">
<error statusCode="404"
redirect="/page-not-found"/>
</customErrors>
</system.web>
</configuration>
Source:Web.config custom errors
精彩评论