为什么用URLRewriting实现URL重写在vs中能运行,放在IIS中就不能运行了?
为什么我用URLRewriting实现URL重写,在VS中预览的时候有效果,放到IIS运行就提示找不到页面了呢?我的重写规则是:
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/Forum-(.*)-(.*)\.aspx</LookFor>
<SendTo>~/Forum.aspx?ForumID=$1&Page=$2</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>~/Thread-(.*)-(.*)-(.*)\.aspx</LookFor>
<SendTo>~/Thread.aspx?ThreadID=$1&ForumID=$2&Page=$3</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
这个问题该怎么解决?谢谢!
还有就是怎么把规则放在单独的xml文件里,
我用<RewriterConfig configPath="~/App_Data/URLRewriter.xml"/>
<RewriterConfig file="~/App_Data/URLRewriter.xml" />这两种方式都不行,这该怎么办?谢谢!
页:
[1]