想把我们站点搞成伪静态的 程序是ASP 自己的服务器系统2003
一、IIS Rewrite.dll配置成功
二、写好伪静态规则
三、重起IIS
上面的三步我都做了
可是打开我的网站却还是显示的 xxx.ASP 各位大哥这是什么原因啊
跪求解答!
- HTML code
[ISAPI_Rewrite] # 3600 = 1 hour CacheClockRate 3600 RepeatLimit 32 #简体中文设置 RewriteRule /index\.html /index.asp RewriteRule /Login\.html /d_hydl.asp RewriteRule /Reg\.html /d_hyzc.asp RewriteRule /zffs\.html /d_zffs.asp RewriteRule /yjbl\.html /d_yjbl.asp RewriteRule /zfwg\.html /d_zfwg.asp RewriteRule /xtjs\.html /d_xtjs.asp RewriteRule /contact\.html /s_contact.asp RewriteRule /About\.html /s_about.asp RewriteRule /jsggView(\d+)\.html /d_jsggView\.asp\?newsid=$1 [N,I] RewriteRule /news(\d+)\.html /news\.asp\?newsid=$1 [N,I]
------解决方案--------------------
需要把你网站里面的连接都改成伪静态的格式的
------解决方案--------------------
原来的名字当然还会动啦。要把网页的连接等东西,都改成mapping后的形式。
------解决方案--------------------
例如 你的页面时 a.asp?id=1 伪静态后 是 a-1.html
那么 a.asp?id=1 依旧还是能访问的啊。
------解决方案--------------------
下面是一个DVBBS 的 伪静态改写 的方法,很好用的 哦
- VBScript code
rem ================== rem 伪静态规则 rem ================== 'isapi_write Public Function ArchiveHtml(Textstr) Str=Textstr If isUrlreWrite = 1 Then Dim Str,re,Matches,Match Set re=new RegExp re.IgnoreCase =True re.Global=True re.Pattern = "index\.asp" str = re.Replace(str,"index.html") ' re.Pattern = "<a(.[^>]*)index\.asp\?boardid=(\d+)(&|&)topicmode=(\d+)?(&|&)list_type=([\d,]+)?(&|&)page=(\d+)?" ' str = re.Replace(str,"<a$1index_$2_$4_$6_$8.html") ' re.Pattern = "<a(.[^>]*)index\.asp\?boardid=(\d+)(&|&)action=(.[^&]*)?(&|&)topicmode=(\d+)?(&|&)list_type=([\d,]+)?(&|&)page=(\d+)?" ' str = re.Replace(str,"<a$1index_$2_$4_$6_$8_$10.html") ' re.Pattern = "<a(.[^>]*)index\.asp\?boardid=(\d+)(&|&)page=(\d+)?(&|&)action=(.[^<>""\'\s]*)?" ' str = re.Replace(str,"<a$1index_$2_$4_$6.html") ' re.Pattern = "<a(.[^>]*)index\.asp\?boardid=(\d+)(&|&)topicmode=(\d+)?" ' str = re.Replace(str,"<a$1index_$2_$4.html") ' re.Pattern = "<a(.[^>]*)index\.asp\?boardid=(\d+)(&|&)page=(\d+)?" ' str = re.Replace(str,"<a$1index_$2_$4_.html") ' re.Pattern = "<a(.[^>]*)index\.asp\?boardid=(\d+)" ' str = re.Replace(str,"<a$1index_$2.html") ' re.Pattern = "<a(.[^>]*)dispbbs\.asp\?boardid=(\d+)(&|&)replyid=(\d+)?(&|&)id=(\d+)?(&|&)skin=(\d+)?(&|&)page=(\d+)?(&|&)star=(\d+)?" ' str = re.Replace(str,"<a$1dispbbs_$2_$4_$6_skin$8_$10_$12.html") ' re.Pattern = "<a(.[^>]*)dispbbs\.asp\?boardid=(\d+)(&|&)replyid=(\d+)?(&|&)id=(\d+)?(&|&)skin=(\d+)?(&|&)star=(\d+)?" ' str = re.Replace(str,"<a$1dispbbs_$2_$4_$6_skin$8_$10.html") ' re.Pattern = "<a(.[^>]*)dispbbs\.asp\?boardid=(\d+)(&|&)replyid=(\d+)?(&|&)id=(\d+)?(&|&)skin=(\d+)?" ' str = re.Replace(str,"<a$1dispbbs_$2_$4_$6_skin$8.html") ' re.Pattern = "<a(.[^>]*)dispbbs\.asp\?boardid=(\d+)(&|&)id=(\d+)?(&|&)page=(\d+)?(&|&)(star|move)=([\w\d]+)?" ' str = re.Replace(str,"<a$1dispbbs_$2_$4_$6_$9.html") ' re.Pattern = "<a(.[^>]*)dispbbs\.asp\?boardid=(\d+)(&|&)id=(\d+)?(&|&)page=(\d+)?" ' str = re.Replace(str,"<a$1dispbbs_$2_$4_$6.html") ' re.Pattern = "<a(.[^>]*)dispbbs\.asp\?boardid=(\d+)(&|&)id=(\d+)?" ' str = re.Replace(str,"<a$1dispbbs_$2_$4.html") ' re.Pattern = "<a(.[^>]*)dv_rss\.asp\?s=(.[^<|>|""|\'|\s]*)" ' str = re.Replace(str,"<a$1dv_rss_$2.html") ' re.Pattern = "<a(.[^>]*)dv_rss\.asp" ' str = re.Replace(str,"<a$1dv_rss.html") Set Re=Nothing End If ArchiveHtml = Str End Function