Whose Fault Is This?
-
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 theRequest.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 neededRequest.ServerVariables("HTTP_REFERER")
. Why the hell it doesn't show up when you do something like this I don't understand.<%
dim iFor 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
-
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 theRequest.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 neededRequest.ServerVariables("HTTP_REFERER")
. Why the hell it doesn't show up when you do something like this I don't understand.<%
dim iFor 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
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. -
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.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 theServer.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