ASP中伪静态规则(asp rewrite) 配置文件httpd.ini写法

发表时间:2010-08-31


以前写过很多,难到不难,而且那些东东又不太好记,有个写过的东西做参照修改起来就快很多,关键就是需要花时间调试。
今天又花了个多小时给个站写了个规则,有些规则是第一次尝试,实际我不懂编程的,好多东西都是自己摸索,然后再调试出来,又记不住,只有存根发到博客上方便下次再参照使用。
httpd.ini 内容示范:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
#简体中文设置
RewriteRule /index\.html /index.asp
RewriteRule /Login\.html /Login.asp
RewriteRule /Reg\.html /Reg.asp
RewriteRule /Getpwd\.html /getpwd.asp
RewriteRule /Notice\.html /work.asp
RewriteRule /Prclass\.html /Prclass.asp
RewriteRule /Doclass\.html /Doclass.asp
RewriteRule /Neclass\.html /Neclass.asp
RewriteRule /About\.html /About.asp
RewriteRule /bbs\.html /bbs_index.asp
RewriteRule /About(\d+)\.html /About\.asp\?ID=$1 [N,I]
RewriteRule /news_content(\d+)\.html /worki\.asp\?ID=$1 [N,I]
RewriteRule /Products(\d+)\.html /Products\.asp\?ID=$1 [N,I]
RewriteRule /Prclass(\d+)\.html /Prclass.asp\?ID=$1 [N,I]
RewriteRule /Prclass.html\?page=(\d+) /Prclass.asp\?page=$1 [N,I]
RewriteRule /down(\d+)\.html /down.asp\?ID=$1 [N,I]
RewriteRule /Doclass(\d+)\.html /Doclass.asp\?ID=$1 [N,I]
RewriteRule /Doclass.html\?page=(\d+) /Doclass.asp\?page=$1 [N,I]
RewriteRule /News(\d+)\.html /news.asp\?ID=$1 [N,I]
RewriteRule /Neclass(\d+)\.html /Neclass.asp\?ID=$1 [N,I]
RewriteRule /Neclass_page(\d+)\.html /Neclass.asp\?page=$1 [N,I]
RewriteRule /info(\d+)\.html /inform.asp\?ID=$1 [N,I]
保存上面的内容到httpd.ini,然后传到网站根目录.

------分割线---------------------------------------

Tags: httpd.ini ASP伪静态 rewrite

留个脚印

点击我更换图片 (请输入验证码)

最新评论