473,809 Members | 2,718 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTTP Referrer questions

A week or so ago, I needed to find the HTTP_REFERER environment
variable to check and see if a user is coming from a certain website:
If Request.ServerV ariables("HTTP_ REFERER")_
= "http://localhost/mydir/page1.aspx" then
response.write "Click on a menu choice"
else
response.write "check back later
end if

I have a page nested in an IFRAME (for example framepage1.aspx or
..asp), and I need to check to see if a user is coming to (not coming
from ) a certain page where the framepage1.aspx is (the
framepage1.aspx could appear in not only page1.aspx, but page2.aspx ,
or page3). I'm not sure how to accomplish this given that the
HTTP_REFERER checks on address only incoming.

Thanks
Chum
Jul 21 '05 #1
2 5075
Chum,

I am sorry but I am not sure what kind of problem you are trying to solve.
Could you please explain it in other words?
As I understand, a user can move to another page by clicking links or
buttons on the current page. You can place code to track clicking links at
the page and in this way control where the user going.

--
Victor Urnyshev [MSFT]
This post is "AS IS" with no warranties, and confers no rights.
--------------------
|From: sp*******@yahoo .com (Chumley the Walrus)
|Newsgroups:
microsoft.publi c.inetserver.as p.general,micro soft.public.dot net.general
|Subject: HTTP Referrer questions
|Date: 12 Jul 2004 13:38:46 -0700
|Organization: http://groups.google.com
|Lines: 20
|Message-ID: <1e************ **************@ posting.google. com>
|NNTP-Posting-Host: 205.138.222.196
|Content-Type: text/plain; charset=ISO-8859-1
|Content-Transfer-Encoding: 8bit
|X-Trace: posting.google. com 1089664759 28251 127.0.0.1 (12 Jul 2004
20:39:19 GMT)
|X-Complaints-To: gr**********@go ogle.com
|NNTP-Posting-Date: Mon, 12 Jul 2004 20:39:19 +0000 (UTC)
|Path:
cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!new sfeed00.sul.t-online.de!t-onlin
e.de!fr.ip.ndso ftware.net!prox ad.net!postnews 2.google.com!no t-for-mail
|Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:139313
microsoft.publi c.inetserver.as p.general:27647 6
|X-Tomcat-NG: microsoft.publi c.dotnet.genera l
|
|A week or so ago, I needed to find the HTTP_REFERER environment
|variable to check and see if a user is coming from a certain website:
|
|
|If Request.ServerV ariables("HTTP_ REFERER")_
|= "http://localhost/mydir/page1.aspx" then
| response.write "Click on a menu choice"
| else
|response.write "check back later
|end if
|
|I have a page nested in an IFRAME (for example framepage1.aspx or
|.asp), and I need to check to see if a user is coming to (not coming
|from ) a certain page where the framepage1.aspx is (the
|framepage1.asp x could appear in not only page1.aspx, but page2.aspx ,
|or page3). I'm not sure how to accomplish this given that the
|HTTP_REFERER checks on address only incoming.
|
|Thanks
|Chum
|

Jul 21 '05 #2
Chumley the Walrus wrote:
A week or so ago, I needed to find the HTTP_REFERER environment
variable to check and see if a user is coming from a certain website:
If Request.ServerV ariables("HTTP_ REFERER")_
= "http://localhost/mydir/page1.aspx" then
response.write "Click on a menu choice"
else
response.write "check back later
end if

I have a page nested in an IFRAME (for example framepage1.aspx or
.asp), and I need to check to see if a user is coming to (not coming
from ) a certain page where the framepage1.aspx is (the
framepage1.aspx could appear in not only page1.aspx, but page2.aspx ,
or page3). I'm not sure how to accomplish this given that the
HTTP_REFERER checks on address only incoming.


Simply forget about referer if you're talking about an Internet based
application. Any old proxy could change that header.
Cheers,
--
Joerg Jooss
jo*********@gmx .net

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1797
by: Travis Pupkin | last post by:
Hi, I built a site half a year ago with form that submits to page that processes the info and then returns the user back to the page they came from using HTTP_REFERER. There's one guy -- using an identical set-up to our main testing platform -- who kept getting the "URL required" error when doing this. For some reason, on his system alone, HTTP_REFERER was not collecting any referring URL.
3
6112
by: exxos | last post by:
Hi all, I'm trying to list to a html page where the referer is, There are a lot of ways ive tried and work, but the problem if my mainpage uses frames, and no matter where I do the referer check it just reports the website url, does anyone know a cure or workaround other than trashing the frames ? Cheers, chris
9
14429
by: Frances Del Rio | last post by:
if I put alert(document.referrer) in code of a file that was linked from another it returns blank... pls, need to get document.referrer, don't why it's not working... read up on oreilly, don't know what I'm doing wrong.. thank you.. Frances
2
2385
by: Goober | last post by:
I have to determine the document.referrer of the individual coming to my site. I want to send everyone not coming from one of those sites to an alternate location (The names below are just used as examples). I want to match on one of those names anywhere in the document.referrer. In the main program I call a subroutine like this: <script LANGUAGE="javascript" SRC="../js/redirect.js"></script> <body leftmargin="0" rightmargin="0"...
3
4446
by: Alex | last post by:
Hi!! i have a major problem, and i've been searching for a solution for about 2 weeks, but havent found one. i have to do a POST-Request to a server, but the server shouldnt know my referrer. i know it would be quite easy to accomplish this with a simple php-Script, but the problem is that i need the browser (client) to do this POST, so that the answer comes directly back to the client, and not first to the php-server and then to the...
2
348
by: Chumley the Walrus | last post by:
A week or so ago, I needed to find the HTTP_REFERER environment variable to check and see if a user is coming from a certain website: If Request.ServerVariables("HTTP_REFERER")_ = "http://localhost/mydir/page1.aspx" then response.write "Click on a menu choice" else response.write "check back later end if
1
2771
by: Mike Dee | last post by:
Hi All - I'm having a strange problem I'm wondering if anyone can shed some light on. When I use ASP or ASP.NET code to get the referrer information from the server side, it comes back as null. However in these same cases document.referrer returns the valid referrer. What could cause this? In other words, with the following line: ref = Request.ServerVariables("HTTP_REFERER") (or its ASP.NET equivalent)
2
3190
by: Fernando Rodríguez | last post by:
Hi, Is there a way to turn the document.referrer string into a Location like object, so I can extrac the domain and other parts of it? Thansk
1
2888
by: Suman | last post by:
Hi all, Is there a way to set the value of HTTP header Referrer to null or to any specified value?? I have tried doing this document.Referrer= null but document.Referrer is a read only property therefore the value can't be changed and a Javascript error is occuring. Any ideas on how this can be achieved.
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10639
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7661
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.