Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Request.ServerVariables("HTTP_REFERER") not working?

Status
Not open for further replies.

seaport

MIS
Jan 5, 2000
923
US
I have one asp page to handling requests from different pages and use the following code to determine the requesting page.

if instr(Request.ServerVariables("HTTP_REFERER"),"transfer.asp")<>0 then
'calling from transfer.asp
else
'calling from other pages
end if

The code works fine on my computer. Some users reported error because although the calling page is transfer.asp, the code for "calling from other pages" executes. So I think probably Request.ServerVariables("HTTP_REFERER") does not work for them and returns empty string.

My guess is that some security settings in these users's network make this variable not being sent out in the HTTP request.

Can anyone help me?

Thanks in advance.

Seaport
 
if transfer.asp is in server, you can mark a session value of "transfered" long enough to catch it was your transfer page, and transfer.asp can capture it's http_referer and store it in this session value, if the session value <> "" then you have something that 1, routed through transfer.asp and 2, you have the http referer in session value to pull...
recommend clearing it directly after pulling it

[thumbsup2]DreX
aKa - Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top