当前位置:编程学习 > C#/ASP.NET >>

伪静态带参数的配置该如何写?

http://www.news.com/great/news.aspx?class_parent=1
想让实现:
http://www.news.com/great/news/1.html
该怎么写呢?
我这样写不行:
RewriteRule /great/([0-9]*).html /great/news.asp\?class_parent=$1

也请给个两个参数的例子:
例如:http://www.news.com/great/articellist.aspx?class_id=8&&class_parent=1
这样写有什么错?
RewriteRule /great/articel/ list-(\w+)-(\w+)\.html /great/articellist\.aspx\class_id=$1&class_parent=$2 --------------------编程问答-------------------- IE8正常啊 --------------------编程问答-------------------- 地址栏还是动态的,没变成html --------------------编程问答--------------------
<rewriter>
<rewrite url="^~/great/news/(\d+).html$" to="~/great/news.aspx?class_parent=$1"/>
<rewrite url="^~/great/article/list-(\d+)-(\d+).html$" to="~/great/articellist.aspx?class_id=$1&class_parent=$2 "/>

</rewriter>
补充:.NET技术 ,  ASP.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,