打开文件KS_Cls/Kesion.CommonCls.asp,搜索”GetAutoDomain“大约在574行,将函数GetAutoDomain和GetCurrentURL分别替换为如下代码:
- Public Function GetAutoDomain()
- Dim TempPath
- If Request.ServerVariables("SERVER_PORT") = "80" Or Request.ServerVariables("SERVER_PORT") = "443" Then
- GetAutoDomain = Request.ServerVariables("SERVER_NAME")
- Else
- GetAutoDomain = Request.ServerVariables("SERVER_NAME") & ":" & Request.ServerVariables("SERVER_PORT")
- End If
- If Instr(UCASE(GetAutoDomain),"/W3SVC")<>0 Then
- GetAutoDomain=Left(GetAutoDomain,Instr(GetAutoDomain,"/W3SVC"))
- End If
- If Request.ServerVariables("SERVER_PORT") = "443" Then
- GetAutoDomain = "https://" & GetAutoDomain
- Else
- GetAutoDomain = "http://" & GetAutoDomain
- End If
- End Function
- '取得当前完整URL
- Public Function GetCurrentURL()
- Dim Url
- Dim ServerPort,ServerName,ScriptName,QueryString
- ServerName = Request.ServerVariables("SERVER_NAME")
- ServerPort = Request.ServerVariables("SERVER_PORT")
- ScriptName = Request.ServerVariables("SCRIPT_NAME")
- QueryString = Request.ServerVariables("QUERY_STRING")
- If ServerPort = "443" Then
- Url="https://"&ServerName
- Else
- Url="http://"&ServerName
- End If
- If ServerPort <> "80" And ServerPort <> "443" Then Url = Url & ":" & ServerPort
- Url=Url&ScriptName
- If QueryString <>"" Then Url=Url&"?"& QueryString
- GetCurrentURL=Url
- End Function