Server Variables

A

Aaron

Is there a server var that will give me the entire URL that is in the
address bar? Currently, I am just adding SERVER_NAME & URL
 
R

Ray at

Something like this - the long and drawn out method

<%
Dim sProtocol, sDomain, sPath, sQuerystring
sResult

'get protocol
sProtocol = "http://"
If UCase(Request.ServerVariabes("HTTPS")) = "ON" Then sProtocol = "https://"

'get domain
sDomain = LCase(Request.ServerVariables("SERVER_NAME"))

'Get path
sPath = LCase(Request.ServerVariables("SCRIPT_NAME"))

'Get querystring
sQuerystring = LCase(Request.Querystring)


''put together
sResult = sProtocol & sDomain & sPath
If Len(sQuerystring) > 0 Then sResult = sResult & "?" & sQuerystring

Ray at work
 
A

Aaron

Yes, that is pert-near what I have ... for some reason I thought there
was a SRVR_VAR that grabbed the entire value of the address bar ... only
JS perhaps. Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top