我已经让 URLRewriter 完美地在我的 localhot 上工作,但在生产中我得到 404 错误。
我正在使用 IIS 6,从我读到的内容来看,这应该可以正常工作。
这是我的 web.config 中的内容:
<rewriter>
<rewrite url="~/(\d+)$" to="~/Items/Details.aspx?ItemId=$1" />
<rewrite url="~/Items/(\d+)$" to="~/Items/Details.aspx?ItemIId=$1" />
</rewriter>
<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>
</httpModules>
有没有人遇到过类似的问题并解决了?
谢谢!