<!-- 手动添加 -->
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections>
<!-- 手动添加 -->
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/Article/(.[\d]*).htm</LookFor>
<SendTo>~/Article.aspx?ID=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>以上是WEB.CONFIG 中的配置文件
并且 IIS中也已经添加映射
按照 http://cunjin.blog.163.com/blog/static/80619468200991225629919/ 中的说法配置
但就是不行哦 也不提示错误
还望高手指点!
对了 是在本地测试
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections>
<!-- 手动添加 -->
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/Article/(.[\d]*).htm</LookFor>
<SendTo>~/Article.aspx?ID=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>以上是WEB.CONFIG 中的配置文件
并且 IIS中也已经添加映射
按照 http://cunjin.blog.163.com/blog/static/80619468200991225629919/ 中的说法配置
但就是不行哦 也不提示错误
还望高手指点!
对了 是在本地测试
2看路径对不对
3加一个这个看看 <compilation debug="false" strict="false" explicit="true">
<buildProviders>
<add extension=".htm" type="System.Web.Compilation.PageBuildProvider"/> </buildProviders>
</compilation>
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/d(\d+)\.aspx</LookFor>
<SendTo>~/default.aspx?id=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<system.web>
<httpHandlers>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
<compilation debug="true"/></system.web>
</configuration>
添加了 显示
错误 15 无法识别的配置节 compilation。 D:\FTP\XinyuNews\web\Web.Config 24
我的IIS是5.1 的
有关系吗?
请指教