FunctiongetCurrentUrl()
OnErrorResumeNext
DimstrTemp
IfLCase(Request.ServerVariables("HTTPS"))="off"Then
strTemp="http://"
Else
strTemp="https://"
EndIf
strTemp=strTemp&Request.ServerVariables("SERVER_NAME")
IfRequest.ServerVariables("SERVER_PORT")<>80Then
strTemp=strTemp&":"&Request.ServerVariables("SERVER_PORT")
endif
strTemp=strTemp&Request.ServerVariables("URL")
getCurrentUrl=strTemp
EndFunction
FunctiongetUrlWithParams()
DimScriptAddress,Servername,qs
ScriptAddress=CStr(Request.ServerVariables("SCRIPT_NAME"))
Servername=CStr(Request.ServerVariables("Server_Name"))
qs=Request.QueryString
IfRequest.ServerVariables("SERVER_PORT")<>80Then
Servername=Servername&":"&Request.ServerVariables("SERVER_PORT")
endif
ifqs<>""then
getUrlWithParams="http://"&Servername&ScriptAddress&"?"&qs
else
getUrlWithParams="http://"&Servername&ScriptAddress
endif
EndFunction
|