我正在将ASP.NET应用程序从IIS6迁移到IIS7,在此过程中,我还将重写设置从Intelligencia.UrlRewriter移植到使用IIS重写。
在有一些问题的“拒绝-By-Urlscan”错误( /åäö.html应该重定向到我的404页)。
在Intelligencia.UrlRewriter中,这起作用是:
<rewrite url="^~/Rejected-By-UrlScan" to="~/sidan-finns-inte.html"/>我把它移植到:
<rule name="Rejected-By-UrlScan">
<match url="^Rejected-By-UrlScan" />
<action type="Rewrite" url="/sidan-finns-inte.html" />
</rule>但是我保留了gettings IIS内部404错误,而不是我的404错误(sidan int.html)。
我怎么才能解决这个问题?
发布于 2012-01-10 08:39:22
我解决了这个问题,我补充道:
<httpErrors errorMode="Custom">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" path="/404.aspx" responseMode="ExecuteURL" />
<remove statusCode="500" subStatusCode="-1" />
<error statusCode="500" path="/Error.aspx" responseMode="ExecuteURL" />
</httpErrors>在Web.Config中
https://serverfault.com/questions/348005
复制相似问题