Copy Code code as follows:
Function Getcurrenturl ()
On Error Resume Next
Dim strtemp
If LCase (Request.ServerVariables ("HTTPS") = "Off" Then
strtemp = "http://"
Else
strtemp = "https://"
End If
strtemp = strtemp & Request.ServerVariables ("SERVER_NAME")
If Request.ServerVariables ("Server_port") <> Then
strtemp = strtemp & ":" & Request.ServerVariables ("Server_port")
End If
strtemp = strtemp & Request.ServerVariables ("URL")
Getcurrenturl = strtemp
End Function
Function Geturlwithparams ()
Dim Scriptaddress,servername,qs
scriptaddress = CStr (Request.ServerVariables ("Script_name"))
Servername = CStr (Request.ServerVariables ("SERVER_NAME"))
Qs=request.querystring
If Request.ServerVariables ("Server_port") <> Then
Servername = Servername & ":" & Request.ServerVariables ("Server_port")
End If
If qs<> "" Then
Geturlwithparams = "http://" & Servername & scriptaddress & "?" &qs
Else
Geturlwithparams = "http://" & Servername & Scriptaddress
End If
End Function