日期:2014-05-17  浏览次数:21300 次

关于asp伪静态的问题 急急急!!!!!
想把我们站点搞成伪静态的 程序是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+)(&|&amp;)topicmode=(\d+)?(&|&amp;)list_type=([\d,]+)?(&|&amp;)page=(\d+)?"
'        str = re.Replace(str,"<a$1index_$2_$4_$6_$8.html")
'        re.Pattern = "<a(.[^>]*)index\.asp\?boardid=(\d+)(&|&amp;)action=(.[^&]*)?(&|&amp;)topicmode=(\d+)?(&|&amp;)list_type=([\d,]+)?(&|&amp;)page=(\d+)?"
'        str = re.Replace(str,"<a$1index_$2_$4_$6_$8_$10.html")
'        re.Pattern = "<a(.[^>]*)index\.asp\?boardid=(\d+)(&|&amp;)page=(\d+)?(&|&amp;)action=(.[^<>""\'\s]*)?"
'        str = re.Replace(str,"<a$1index_$2_$4_$6.html")
'        re.Pattern = "<a(.[^>]*)index\.asp\?boardid=(\d+)(&|&amp;)topicmode=(\d+)?"
'        str = re.Replace(str,"<a$1index_$2_$4.html")
'        re.Pattern = "<a(.[^>]*)index\.asp\?boardid=(\d+)(&|&amp;)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+)(&|&amp;)replyid=(\d+)?(&|&amp;)id=(\d+)?(&|&amp;)skin=(\d+)?(&|&amp;)page=(\d+)?(&|&amp;)star=(\d+)?"
'        str = re.Replace(str,"<a$1dispbbs_$2_$4_$6_skin$8_$10_$12.html")
'        re.Pattern = "<a(.[^>]*)dispbbs\.asp\?boardid=(\d+)(&|&amp;)replyid=(\d+)?(&|&amp;)id=(\d+)?(&|&amp;)skin=(\d+)?(&|&amp;)star=(\d+)?"
'        str = re.Replace(str,"<a$1dispbbs_$2_$4_$6_skin$8_$10.html")
'        re.Pattern = "<a(.[^>]*)dispbbs\.asp\?boardid=(\d+)(&|&amp;)replyid=(\d+)?(&|&amp;)id=(\d+)?(&|&amp;)skin=(\d+)?"
'        str = re.Replace(str,"<a$1dispbbs_$2_$4_$6_skin$8.html")
'        re.Pattern = "<a(.[^>]*)dispbbs\.asp\?boardid=(\d+)(&|&amp;)id=(\d+)?(&|&