永发信息网

ISAPI Rewrite 规则

答案:1  悬赏:50  手机版
解决时间 2021-05-14 20:47
例如: http://www.abc.com/item_list.asp?classid=1&page=2
想变成 http://www.abc.com/item_list-1-2.htm
规则怎么编写?
翻页程序怎么改?
<td align="center" class="STYLE1"><% if currentpage<2 then%>  
      <font color="#003366">First  Previous   <%else%>
      </font> <a href=item_list.asp?classID=<%=ClassID%>&page=1>
      <font color="#003366">First</font></a><font color="#003366"> 
      </font> <a href=item_list.asp?classID=<%=ClassID%>&page=<%=currentpage-1%>>
      <font color="#003366">Previous</font></a><font color="#003366"> <%end if%>  </font><font color="#FF0000"><%=currentpage%></font><font color="#003366">/</font><font color="#000080"><%=totalpage%></font><font color="#003366">   <%if totalpage-currentpage<1 then%></font> <font color="#003366">Next  End <% else%>
      </font> <a href=item_list.asp?classID=<%=ClassID%>&page=<%=currentpage+1%>>
      <font color="#003366">Next</font></a>  <a href=item_list.asp?classID=<%=ClassID%>&page=<%=totalpage%>><font color="#003366">End</font></a> <%end if%> <font color="#FF0000">Total records: <%=totalrs%>
      </font> </td>
最佳答案
来使用的是网上流传的ISAPI_Rewrite 2.9FuL版Cracked版。后来发现并没有Crack掉,一个月 or 45天后还是会失效。

痛心疾首,立即找其他解决办法。暂时在用了ISAPI_rewrite 3.l Lite版。该版的缺点是不支持分站,。

一个IIS只能运行一个Global级的Httpd.CONF。升级后发现3.1规则有变化,与2.x稍有变动。不过他提供了“老格式导入转成3.x功能”

以下发布本人使用的两个版本,造福Windows Server,IIS玩家。 :p

最新版本的Wordpress2.3.2版通过测试可用

#IIS ISAPI_Rewrite For WordPress:

形式1:年/月/日/Postname.html

[ISAPI_Rewrite]

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP

# # 形式:年/月/日/Postname.html
# # 自定义链接  /%year%/%monthnum%/%day%/%postname%.html
# # URL: http://www.dengjin.com

RewriteRule /tag/(.*) /index\.php\?tag=$1
RewriteRule /(about|contact|about-copyright|favor|archives|tags|sitemap)/ /index\.php\?pagename=$1
RewriteRule /category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&feed=$2
RewriteRule /category/?(.*) /index\.php\?category_name=$1
RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?author_name=$1&feed=$2
RewriteRule /author/?(.*) /index\.php\?author_name=$1
RewriteRule /feed/?$ /wp-feed\.php/\?feed=rss2
RewriteRule /comments/feed/?$ /wp-feed\.php/\?feed=comments-rss2
RewriteRule /page/(.*)/ /index\.php\?paged=$1
RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/?([0-9]+)?.html/?$ /index\.php\?year=$1&monthnum=$2&day=$3&name=$4&page=$5
RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&day=$3&page=$4
RewriteRule /([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3
RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+).html/(feed|rdf|rss|rss2|atom)/?$ /index\.php\?year=$1&monthnum=$2&day=$3&name=$4&feed=$5
RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+).html/trackback/?$ /wp-trackback\.php\?year=$1&monthnum=$2&day=$3&name=$4&tb=1


形式2:形式:年/月/日/Postname/

[ISAPI_Rewrite]

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP

# # 形式:年/月/日/Postname/
# # 自定义链接  /%year%/%monthnum%/%day%/%postname%/
# # URL: http://www.dengjin.com

RewriteRule /tag/(.*) /index\.php\?tag=$1
RewriteRule /(about|contact|about-copyright|favor|archives|tags|sitemap)/ /index\.php\?pagename=$1
RewriteRule /category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&feed=$2
RewriteRule /category/?(.*)/ /index\.php\?category_name=$1
RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?author_name=$1&feed=$2
RewriteRule /author/?(.*) /index\.php\?author_name=$1
RewriteRule /feed/?$ /wp-feed\.php/\?feed=rss2
RewriteRule /comments/feed/?$ /wp-feed\.php/\?feed=comments-rss2
RewriteRule /page/(.*)/ /index\.php\?paged=$1
RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/?([0-9]+)?/?$ /index\.php\?year=$1&monthnum=$2&day=$3&name=$4&page=$5
RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&day=$3&page=$4
RewriteRule /([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3
RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /index\.php\?year=$1&monthnum=$2&day=$3&name=$4&feed=$5
RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/trackback/?$ /wp-trackback\.php\?year=$1&monthnum=$2&day=$3&name=$4&tb=1




形式3:/post/PostID.html

[ISAPI_Rewrite]

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP


# # 形式:/post/PostID.html
# # 自定义链接 /post/%post_id%.html
# # URL: http://www.dengjin.com

RewriteRule /post/tag/(.*) /index\.php\?tag=$1
RewriteRule /tag/(.*) /index\.php\?tag=$1
RewriteRule /(about|contact|about-copyright|favor|archives|tags|sitemap|taotao) /index\.php\?pagename=$1
RewriteRule /post/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&feed=$2
RewriteRule /post/category/?(.*) /index\.php\?category_name=$1
RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?author_name=$1&feed=$2
RewriteRule /author/?(.*) /index\.php\?author_name=$1
RewriteRule /rss.xml /wp-feed\.php/\?feed=rss2
RewriteRule /feed/?$ /wp-feed\.php/\?feed=rss2
RewriteRule /comments/feed/?$ /wp-feed\.php/\?feed=comments-rss2
# RewriteRule /([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&page=$2
# RewriteRule /post/([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&page=$2
RewriteRule /post/([0-9]+).html /index\.php\?p=$1 [I]
RewriteRule /page/(.*)/?s=(.*) /index\.php\?s=$2&paged=$1
RewriteRule /page/(.*) /index\.php\?paged=$1
RewriteRule /post/date/([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/?([0-9]+)?/?$ /index\.php\?year=$1&monthnum=$2&day=$3&name=$4&page=$5
RewriteRule /post/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&day=$3&page=$4
RewriteRule /post/date/([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3
RewriteRule /post/([0-9]+).html/(feed|rdf|rss|rss2|atom) /index\.php\?feed=rss2&p=$1
RewriteRule /post/([0-9]+).html/trackback /wp-trackback\.php\?p=$1
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
你是否会偷偷地看你喜欢的人?
不高兴 怎么办
帮我看下我这配置能玩AVA么?
善的声母是什么,汉语拼音的声母,韵母是什么
道外区中国光大银行24小时自助银行(禧龙社区
给点关于后宫争斗的电视剧名字 谢谢
四核cpu的问题
荷兰哪里有中医?
什么是本票?本票与支票的区别是什么?
怎么动房间里的东西
能给我曼珠沙华叶子的图片吗
形容人笑容温暖的句子,关于温暖微笑的句子?
辰溪县立邦油漆这个地址怎么能查询到,着急去
你认为最好听的流行歌曲是什么
单机版DOTA怎么下载啊?
推荐资讯
求而不得的诗词,有哪些表示求而不得的诗句
鄂城区新世纪舞蹈我想知道这个在什么地方
关于 QQ空间的 qq宝贝 (高手请进)
谁能给 我 一颗QQ音信种子谢谢654907115
暮光之城 新月 有什么网站可以直接看全集么?
汝南县汝南服务区餐饮怎么去啊,谁知道地址啊
江岸区农家菜馆(万达店)地址在哪里啊
狄仁杰是洛阳人吗?
如何添加QQ牧场和农场
霸气的朋友生日祝福语,朋友要参加游泳比赛,该
宝丰县鑫鸿人力招募中心哪位知道具体地址啊
谁知道「小虎队」『天地一沙欧』的歌词啊、…
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?