Created
May 8, 2013 06:36
-
-
Save jesse1981/5538651 to your computer and use it in GitHub Desktop.
Method to get the current page URL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function curPageURL() | |
dim s, protocol, port | |
if Request.ServerVariables("HTTPS") = "on" then | |
s = "s" | |
else | |
s = "" | |
end if | |
protocol = strleft(LCase(Request.ServerVariables("SERVER_PROTOCOL")), "/") & s | |
if Request.ServerVariables("SERVER_PORT") = "80" then | |
port = "" | |
else | |
port = ":" & Request.ServerVariables("SERVER_PORT") | |
end if | |
curPageURL = protocol & "://" & Request.ServerVariables("SERVER_NAME") &_ | |
port & Request.ServerVariables("SCRIPT_NAME") | |
end function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment