CopyCode The Code is 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") <> 80 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") <> 80 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