关于asp伪静态的问题 急急急!!!!!
想把我们站点搞成伪静态的 程序是ASP 自己的服务器系统2003
一、IIS Rewrite.dll配置成功
二、写好伪静态规则
三、重起IIS
上面的三步我都做了
可是打开我的网站却还是显示的 xxx.ASP 各位大哥这是什么原因啊
跪求解答!
- HTML code
[ISAPI_Rewrite]# 3600 = 1 hourCacheClockRate 3600RepeatLimit 32#简体中文设置RewriteRule /index\.html /index.aspRewriteRule /Login\.html /d_hydl.aspRewriteRule /Reg\.html /d_hyzc.aspRewriteRule /zffs\.html /d_zffs.aspRewriteRule /yjbl\.html /d_yjbl.aspRewriteRule /zfwg\.html /d_zfwg.aspRewriteRule /xtjs\.html /d_xtjs.aspRewriteRule /contact\.html /s_contact.aspRewriteRule /About\.html /s_about.aspRewriteRule /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_writePublic 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 = StrEnd Function
[解决办法]
[解决办法]
有个详细案例就好了!