1、让iis支持rewrite.dll
2、书写规则
将http://localhost/rewrite.asp?page=1伪造成http://localhost/rewrite_1.html
RewriteRule /rewrite_(\d+)\.html /rewrite\.asp\?page=$1 [N,I] 将http://localhost/rewrite.asp?page=1&id=1伪造成http://localhost/rewrite_1_1.html
RewriteRule /rewrite_(\d+)_(\d+)\.html /rewrite\.asp\?page=$1&id=$2 [N,I] 将http://localhost/rewrite.asp?page=1#abc伪造成http://localhost/rewrite_1.html#abc
RewriteRule /rewrite_(\d+)\.html#(\d+) /rewrite\.asp\?page=$1#$2 [N,I] 3、asp代码示例
page=cint(request(“page”))
id=request(“id”)
If page=”” or page<1 Then page=1
If id=”” or id<1 Then id=1
For i=1 to 10
Response.Write “<a href=’rewrite_”&i&”_”&id&”.html’>”&i&”</a>”
Next

» ASP网站伪静态规则

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。