Connecting Tech Pros Worldwide Help | Site Map

Display complete URL in cluding parameters

Member
 
Join Date: Dec 2007
Posts: 52
#1: May 1 '09
Hi, i am trying to pass a URL for a send-to-friend script. I am having trouble getting the complete URL including: http or https, full link (eg: www.server.com/xxx/xxx, and qury parameter. any help would be appreciated.

Thanks,
Leon
Newbie
 
Join Date: Jun 2007
Posts: 26
#2: May 6 '09

re: Display complete URL in cluding parameters


This will give you the current URL -

CurrentURL = Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("HTTP_URL")

See http://msdn.microsoft.com/en-us/library/ms524602.aspx for a list of parameters you can use.
jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#3: May 6 '09

re: Display complete URL in cluding parameters


Quote:

Originally Posted by darnnnel View Post

Hi, i am trying to pass a URL for a send-to-friend script. I am having trouble getting the complete URL including: http or https, full link (eg: www.server.com/xxx/xxx, and qury parameter. any help would be appreciated.

Thanks,
Leon

do you need to do it programmatically, or can you hard-code some of it? Is there anything else you can tell us about the problem?

Jared
Member
 
Join Date: Dec 2007
Posts: 52
#4: May 6 '09

re: Display complete URL in cluding parameters


Hi, thank you all for the quick replies. As mentioned above: CurrentURL = Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("HTTP_URL") works great, the only thing that i am missing is the HTTP:// or HTTPS:// portion of the URL. Is there a way to get that?
Reply