Display complete URL in cluding parameters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • darnnnel
    New Member
    • Dec 2007
    • 52

    Display complete URL in cluding parameters

    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
  • liz0001
    New Member
    • Jun 2007
    • 26

    #2
    This will give you the current URL -

    CurrentURL = Request.ServerV ariables("HTTP_ HOST") & Request.ServerV ariables("HTTP_ URL")

    See http://msdn.microsoft.com/en-us/library/ms524602.aspx for a list of parameters you can use.

    Comment

    • jhardman
      Recognized Expert Specialist
      • Jan 2007
      • 3405

      #3
      Originally posted by darnnnel
      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 programmaticall y, or can you hard-code some of it? Is there anything else you can tell us about the problem?

      Jared

      Comment

      • darnnnel
        New Member
        • Dec 2007
        • 52

        #4
        Hi, thank you all for the quick replies. As mentioned above: CurrentURL = Request.ServerV ariables("HTTP_ HOST") & Request.ServerV ariables("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?

        Comment

        Working...