我有一个404错误的页面,昨天的response.status是404,response.Addheader工作正常,但今天它只显示一个空白页面,如果我检查标题状态,它是404。
以下是我的代码的一部分
Response.Status="404 Not Found"
Response.AddHeader "Location", domain & "/page-not-found"在相同的代码中- 301状态工作正常
IIS 7,vb脚本,经典asp
发布于 2012-04-17 10:45:13
你可以编辑你的web.config重定向到404...
<configuration>
<system.web>
<customErrors defaultRedirect="/page-not-found"
mode="RemoteOnly">
<error statusCode="404"
redirect="/page-not-found"/>
</customErrors>
</system.web>
</configuration>来源:Web.config custom errors
https://stackoverflow.com/questions/6248055
复制相似问题