Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Back Room
  4. Whose Fault Is This?

Whose Fault Is This?

Scheduled Pinned Locked Moved The Back Room
comtoolsquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nick Parker
    wrote on last edited by
    #1

    Ok, on a project I am working on I have three separate pages that can submit to the same search results page, based on what page they come from I give them a message at the top of the search results page identifying their search criteria. To the point here I couldn't remember the exact ServerVariable that would give me the referer. I remembered that I wrote a quick script to list all keys and their values from the Request.ServerVariables object. I quickly ran it and found that I wasn't able to find the key I was looking for. This required me to do some (see below) research. I quickly found all I needed Request.ServerVariables("HTTP_REFERER"). Why the hell it doesn't show up when you do something like this I don't understand.

    <%
    dim i

    For each i in Request.ServerVariables
    Response.Write "<b><font size='2'>" & i & "</font></b>" & ": <font size='2'>" & _
    Request.ServerVariables(i) & "</font><br><br>"

    Next
    %>

    Note from above: --Some Research: 5 seconds wasted doing a search on Google. :mad: Nick Parker


    Richard DeemingR 1 Reply Last reply
    0
    • N Nick Parker

      Ok, on a project I am working on I have three separate pages that can submit to the same search results page, based on what page they come from I give them a message at the top of the search results page identifying their search criteria. To the point here I couldn't remember the exact ServerVariable that would give me the referer. I remembered that I wrote a quick script to list all keys and their values from the Request.ServerVariables object. I quickly ran it and found that I wasn't able to find the key I was looking for. This required me to do some (see below) research. I quickly found all I needed Request.ServerVariables("HTTP_REFERER"). Why the hell it doesn't show up when you do something like this I don't understand.

      <%
      dim i

      For each i in Request.ServerVariables
      Response.Write "<b><font size='2'>" & i & "</font></b>" & ": <font size='2'>" & _
      Request.ServerVariables(i) & "</font><br><br>"

      Next
      %>

      Note from above: --Some Research: 5 seconds wasted doing a search on Google. :mad: Nick Parker


      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      Request.ServerVariables("HTTP_REFERER") only shows up when there is a referer. If you type the address in, you won't get one, so it won't show up.

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      N 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        Request.ServerVariables("HTTP_REFERER") only shows up when there is a referer. If you type the address in, you won't get one, so it won't show up.

        N Offline
        N Offline
        Nick Parker
        wrote on last edited by
        #3

        Richard_D wrote: Request.ServerVariables("HTTP_REFERER") only shows up when there is a referer. If you type the address in, you won't get one, so it won't show up. Again I feel like there is an error in that statement. You see HTTP_REFERER is a valid key regardless of whether or not there is an associated value to it, when you cycle through the Server.Variables you will see several keys that don't have a value at that time, however that doesn't mean their key isn't show, that is the problem I am talking about.[

        Nick Parker

        ](mailto:nickp@netins.com)


        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups