带参数的url重写
使用的是URLRewriter.dll
在web.config文件里:
HTML code
<RewriterRule>
<LookFor>http://www.test.com/(\d+)/</LookFor>
<SendTo>~/index.aspx?classNum=$1</SendTo>
</RewriterRule>
在浏览器中输入 www.test.com/123
让它重写到 www.test.com/index.aspx?classNum=123
结果无法实现,求教
------解决方案--------------------
<RewriterRule>
<LookFor>http://www.test.com/(\d+)/default.aspx</LookFor>
<SendTo>~/index.aspx?classNum=$1</SendTo>
</RewriterRule>
目录最终要使它匹配到缺省的页面地址
------解决方案--------------------
------解决方案--------------------