【发布时间】:2013-08-28 21:53:54
【问题描述】:
我们有一个 404 页面。当我们在 404 页面时,我们有搜索框。如果我们尝试从搜索框中搜索,它会再次返回到 404 页面。我们该如何处理?
PS:我的搜索按钮在用户控件内,而用户控件在母版页内。
当我们访问以下网站时; http://www.x.com/dk
转到 404。
然后,如果我们从 th,s 404 页面进行搜索,它会将我们定向到下面的链接; http://www.x.com/dk?404%3bhttp%3a%2f%2fwww.x.com%3a80%2fdk
我的网络配置集
<customErrors mode="Off" defaultRedirect="Error.aspx">
<error statusCode="404" redirect="PageNotFound.aspx" />
</customErrors>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" path="/PageNotFound.aspx" prefixLanguageFilePath="" responseMode="ExecuteURL" />
</httpErrors>
【问题讨论】:
标签: asp.net iis iis-7 web-config http-status-code-404