【发布时间】:2012-07-09 14:52:12
【问题描述】:
我正在尝试实现this Url Rewriting 文章中的方法 3。
我已经添加了所有必需的配置(在 UrlRewriter 模块的 web.config 中)但是当我尝试在 web.config 中添加它时:
<configuration>
<configSections>
<sectionGroup>
<section name="rewriter"
requirePermission="false"
type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
</sectionGroup>
</configSections>
<system.web>
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>
</httpModules>
</system.web>
<rewriter>
<rewrite url="~/products/(.+)" to="~/products.aspx?category=$1" />
</rewriter>
</configuration>
它给了我:
无法识别的配置部分 重写...
请告诉我为什么它告诉我我把重写器 xml 节点放在了错误的位置?
谢谢...
解决方案:我已将 section 节点放在 sectionGroup 下,而它必须直接位于 configSections 下
【问题讨论】:
标签: c# asp.net url-rewriting