科訊系統(tǒng)后臺(tái)網(wǎng)址域名自動(dòng)獲取帶端口導(dǎo)致鏈接錯(cuò)誤的解決辦法
2024-07-09 22:57:16
供稿:網(wǎng)友
科訊系統(tǒng)后臺(tái)網(wǎng)站設(shè)置里的 網(wǎng)站地址,會(huì)自動(dòng)獲取網(wǎng)站地址,但有時(shí)獲取的地址會(huì)帶端口號(hào),比如:http://www.baidu.com:8011
所以網(wǎng)站所有的鏈接都帶有端口號(hào)導(dǎo)致無(wú)法網(wǎng)頁(yè)。
解決辦法如下:
打開 ks_cls/kesion.commoncls.asp
‘**************************************************
‘函數(shù)名:GetAutoDoMain()
‘作 用:取得當(dāng)前服務(wù)器IP 如:http://127.0.0.1
‘參 數(shù):無(wú)
‘**************************************************
Public Function GetAutoDomain()
Dim TempPath
If Request.ServerVariables(“SERVER_PORT”) = “80″ 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
GetAutoDomain = “http://” & GetAutoDomain
End Function
修改為:
‘**************************************************
‘函數(shù)名:GetAutoDoMain()
‘作 用:取得當(dāng)前服務(wù)器IP 如:http://127.0.0.1
‘參 數(shù):無(wú)
‘**************************************************
Public Function GetAutoDomain()
Dim TempPath
If Request.ServerVariables(“SERVER_PORT”) = “80″ Then
GetAutoDomain = Request.ServerVariables(“SERVER_NAME”)
Else
GetAutoDomain = Request.ServerVariables(“SERVER_NAME”)
End If
If Instr(UCASE(GetAutoDomain),”/W3SVC”)<>0 Then
GetAutoDomain=Left(GetAutoDomain,Instr(GetAutoDomain,”/W3SVC”))
End If
GetAutoDomain = “http://” & GetAutoDomain
End Function