蓝雨 发表于 2009-11-6 10:15:01

动网8.2无组件伪静态插件

修改地址定向:

conn.asp


找到isUrlreWrite = 0修改为isUrlreWrite = 1

最后一行添加:
<!--#Include File=\"inc/UrlreWrite.Asp\"-->



inc/Dv_ClsMain.asp


136行左右找到isapi_write
将Public Function ArchiveHtml(Textstr)和End Function之间的内容替换为

Str=Textstr
If isUrlreWrite = 1 Then
   Dim Str,re,Matches,Match
   Set re=new RegExp
   re.IgnoreCase =True
   re.Global=True
   re.Pattern = \"<a(.[^>]*)index\\.asp\\?boardid=(\\d+)(&|&)topicmode=(\\d+)?(&|&)list_type=([\\d,]+)?(&|&)page=(\\d+)?\"
   str = re.Replace(str,\"<a$1index.asp?/$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.asp?/$2/$4/$6/$8/$10.html\")
   re.Pattern = \"<a(.[^>]*)index\\.asp\\?boardid=(\\d+)(&|&)page=(\\d+)?(&|&)action=(.[^<>\"\"\\\\s]*)?\"
   str = re.Replace(str,\"<a$1index.asp?/$2/$4/$6.html\")
   re.Pattern = \"<a(.[^>]*)index\\.asp\\?boardid=(\\d+)(&|&)topicmode=(\\d+)?\"
   str = re.Replace(str,\"<a$1index.asp?/$2/topicmode$4.html\")
   re.Pattern = \"<a(.[^>]*)index\\.asp\\?boardid=(\\d+)(&|&)page=(\\d+)?\"
   str = re.Replace(str,\"<a$1index.asp?/$2/page$4.html\")
   re.Pattern = \"<a(.[^>]*)index\\.asp\\?boardid=(\\d+)\"
   str = re.Replace(str,\"<a$1index.asp?/$2.html\")
   re.Pattern = \"<a(.[^>|_]*)index\\.asp\"
   str = re.Replace(str,\"<a$1index.asp\")
   re.Pattern = \"<a(.[^>]*)dispbbs\\.asp\\?boardid=(\\d+)(&|&)replyid=(\\d+)?(&|&)id=(\\d+)?(&|&)skin=(\\d+)?(&|&)page=(\\d+)?(&|&)star=(\\d+)?\"
   str = re.Replace(str,\"<a$1dispbbs.asp?/$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.asp?/$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.asp?/$2/$6/replyid$4/skin$8.html\")
   re.Pattern = \"<a(.[^>]*)dispbbs\\.asp\\?boardid=(\\d+)(&|&)id=(\\d+)?(&|&)page=(\\d+)?(&|&)star=(\\d+)?\"
   str = re.Replace(str,\"<a$1dispbbs.asp?/$2/$4/$6/star$8.html\")
   re.Pattern = \"<a(.[^>]*)dispbbs\\.asp\\?boardid=(\\d+)(&|&)id=(\\d+)?(&|&)page=(\\d+)?(&|&)move=(\\d+)?\"
   str = re.Replace(str,\"<a$1dispbbs.asp?/$2/$4/$6/move$8.html\")
   re.Pattern = \"<a(.[^>]*)dispbbs\\.asp\\?boardid=(\\d+)(&|&)id=(\\d+)?(&|&)page=(\\d+)?\"
   str = re.Replace(str,\"<a$1dispbbs.asp?/$2/$4/$6.html\")
   re.Pattern = \"<a(.[^>]*)dispbbs\\.asp\\?boardid=(\\d+)(&|&)id=(\\d+)?\"
   str = re.Replace(str,\"<a$1dispbbs.asp?/$2/$4.html\")
   re.Pattern = \"<a(.[^>]*)dv_rss\\.asp\\?s=(.[^<|>|\"\"|\\|\\s]*)\"
   str = re.Replace(str,\"<a$1dv_rss.asp?/$2.html\")
   re.Pattern = \"<a(.[^>]*)dv_rss\\.asp\"
   str = re.Replace(str,\"<a$1dv_rss.asp\")
   Set Re=Nothing
End If
ArchiveHtml = Str



inc/Main82.js


查找if (ISAPI_ReWrite==1)
将他下面到else之间改为
html+=\"<a href=\\\"index.asp?/\"+LoadBoard+\".html\\\">\"+ outtext + \"\" + boardtype +\"</a><br />\" + getboardmenu(boardlist,LoadBoard);



Login.asp


查找If isUrlreWrite = 1 Then 共两处相同的代码
全都修改成下面的
If isUrlreWrite = 1 Then
   Comeurl=\"index.html\"
Else
   Comeurl=\"index.asp\"
End If





修改变量传递

inc/Dv_ClsMain.asp


找到BoardID = Request(\"BoardID\") 修改为

if IsUrlreWrite = 1 then BoardID=UBoardID
if Request(\"BoardID\")<>\"\" then BoardID = Request(\"BoardID\")



index.asp


找到action=Request(\"action\") 修改为
if IsUrlreWrite = 1 then action=Uaction
if Request(\"action\")<>\"\" then action=Request(\"action\")

找到Page=Request(\"Page\") 修改为
if IsUrlreWrite = 1 then Page=Upage
if Request(\"Page\")<>\"\" then Page=Request(\"Page\")

找到 If Request(\"topicmode\")<>\"\" and IsNumeric(Request(\"topicmode\")) Then 将其到End if之间的代码修改为
If Request(\"topicmode\")<>\"\" and IsNumeric(Request(\"topicmode\")) Then
TopicMode=Cint(Request(\"topicmode\"))
Else if IsUrlreWrite = 1 then
   topicmode=Cint(Utopicmode)
else
   TopicMode=0
end if
End If

找到if Request(\"list_type\")<>\"\" then list_type=Replace(Request(\"list_type\"),\" \",\"\")在其上方添加
if IsUrlreWrite = 1 then
list_type=Ulisttype
topicmode=Cint(Utopicmode)
end if

找到Case \"showpage\"将其下方的代码修改为
Dim gaction,Ulisttype1
   if IsUrlreWrite = 1 then
    Ulisttype1=Ulisttype
   else
    if Request(\"list_type\")<>\"\" then Ulisttype1=Replace(Request(\"list_type\"),\" \",\"\")
   end if
   If action<>\"\" Then gaction= \"&action=\"&action
   TPL_ShowPage Page,Count, Dvbbs.CheckNumeric(Dvbbs.Board_Setting(26)),10, \"index.asp?boardid=\"&Dvbbs.BoardID & gaction &\"&TopicMode=\"&TopicMode&\"&List_Type=\"&Ulisttype1&\"&Page=\"



dispbbs.asp


找到Page=Request(\"page\")在其下方添加
if IsUrlreWrite = 1 then Page=UPage

找到Sub LoadTopicInfo() 将其下方的代码修改为
If isUrlreWrite = 1 Then AnnounceID = Dvbbs.CheckNumeric(UID)
if Request(\"ID\")<>\"\" then AnnounceID = Dvbbs.CheckNumeric(Request(\"ID\"))
If 0=AnnounceID Then Dvbbs.AddErrCode(30):Dvbbs.Showerr()
If isUrlreWrite = 1 Then G_CurrentPage = Dvbbs.CheckNumeric(Ustar)
if Request(\"star\")<>\"\" then G_CurrentPage = Dvbbs.CheckNumeric(Request(\"star\"))
If 0=G_CurrentPage Then G_CurrentPage=1
If isUrlreWrite = 1 Then Skin=Uskin
if Request(\"Skin\")<>\"\" then Skin=Request(\"Skin\")
If Skin=\"\" Or Not IsNumeric(Skin) Then Skin=Dvbbs.Board_setting(42)
Dim Rs, SQL, iLockSet, iTopicMode, sMove
If isUrlreWrite = 1 Then sMove= Umove
if request(\"move\")<>\"\" then sMove= request(\"move\")

找到ReplyID   = Dvbbs.CheckNumeric(UReplyID)修改为
If isUrlreWrite = 1 Then ReplyID   = Dvbbs.CheckNumeric(UReplyID)
if Request(\"ReplyID\")<>\"\" then ReplyID   = Dvbbs.CheckNumeric(Request(\"ReplyID\"))



下载附件解压后将UrlreWrite.ASP文件上传至根目录下的INC文件夹...
页: [1]
查看完整版本: 动网8.2无组件伪静态插件