Http_referer Add In Several Pages How Can I Do This
I am trying to add the http_referer to certain pages within my site but i am having a few problems, can anyone offer advise on what is wrong with my code below please:
<%
'test the user came from one of our pages
If InStr(1,Request.ServerVariables("HTTP_REFERER"),"registration.asp") = 0 OR InStr(1,Request.ServerVariables("HTTP_REFERER"),"update.asp") = 0 Then
Response.Redirect("home.asp")
end if
%>
I basically want any pages that contain a form on them to be checked that they have been submitted from within my site. The two form pages are called registration.asp and update.asp.
View Replies
ADVERTISEMENT
I know that the referer can be hidden, but is it hidden between files when called one after the other?
first.asp
Code:
<script type="text/javascript" src="next.asp"></script>
next.asp
Code:
alert("<%=request.serverVariables("HTTP_REFERER")%>")
And I need to get "first.asp" accurately
View Replies
View Related
Is there any way to grab the HTTP_REFERER server variable in a pop up?
Example:
www.site1.com pops open www.site2.com that needs to see if it was
popped from www.site1.com
Currently, that value is empty
View Replies
View Related
i wanted to monitor the traffic coming to my site.
so i used http_referer tag to find the location from users are coming to my site.
and i found a strange thing that i got only was able to trap a few referers and not all, and that too
of a page of my site.
i couldnt find any referer from anyother site... i mean the field remain empty in my Database for most of the referers.
i wondered why is it so?
View Replies
View Related
I'm trying to retreive information using Request.ServerVariables("HTTP_REFERER"), with no success. The users arrive to the page using simple link, and without being redirected or any other way - just a simple click on a link.
It is important to say that they click on the link in one website (Hosted on server A) and arriving to another website (Hosted on server B), where I'm using the HTTP_REFERER. maybe this is the reason to my problem ?
View Replies
View Related
I've written an application that makes use of the HTTP_REFERER server variable to redirect users to a page they just came from. This has worked for everyone that's used the application except one person where they get the following error:
Response object error 'ASP 0158 : 80004005'
Missing URL
/admin_dbupdate.asp, line 10
A URL is required
View Replies
View Related
I am having a little problem with the use of HTTP_REFERER I have managed to get it to work correct and as required only if I add the full URI of my site, how can I do this so that I only have to name the pages in question. An example of my code is shown below
'test the user came from one of our pages
If InStr(Request.ServerVariables("HTTP_REFERER"),"http://mydomainspace/eca/new_customer_reg.asp") = 0 Then
Response.Redirect("home.asp")
end if
Can anyone offer a solution in simple terms as I am an ASP newbie, so that I can remove the http://mydomainspace/eca and just use "new_customer_reg.asp" I currently do not have any databases and nor do i wish to yet - still learning the very basics first. I say this as I have seen several solutions that use databases.
View Replies
View Related
I am giving the following:
test = request.servervariables("HTTP_REFERER")
response.write test
It just gives me blank page and does not give me the URL. I tried request.servervariables("REMOTE_ADDR") it gives me the IP address but HTTP_REFERER is not working. What could be the reason.
View Replies
View Related
Should there be any reason to not get the referer "server variable" if I got to the page by clicking on a flash banner?
View Replies
View Related
Just wondering if anyone has found a way to grab the referring URL if the resulting page isn't from a HREF link.
To explain further:
I am creating an ASP driven weblog and am trying to avoid using the queryString to pull out the correct posts (Primarily for better search engine results). To do this I would like the user to be able to click on or type in something like
http://host/weblog/year/month/shorttitle
Under normal circumstances this would look for the default page in a folder called "shorttitle" but instead I defer this to a custom 404 error page which would strip out the URL and do a database query depending on the year, month and shorttitle.
However - this all works a treat when you click a generated link as the HTTP_REFERER is sent through in the headers, but if this is simply typed into the address bar the HTTP_REFERER is blank upon reaching the 404 page.
View Replies
View Related
Is there a way to suprress the HTTP_Referer using VBScript/ASP?
View Replies
View Related
I have some one linking to my site, that I don't want linking to my site, and I get get them to remove the link. What i'm trying to do is redirect everything from that particular domian. I would prefer to send them off my site if possible but am willing to create a dead page if I need to.
I'm sure it's rather simple but I can't seem to figure it out (after much reading and several attempts).
View Replies
View Related
I understand that Request.ServerVariables("HTTP_REFERER") is empty when the
page is redirected.Does that mean that it is also empty when redirected on client side? (Suchas location.href = ...) Actually, I do that and all I get in HTTP_REFERER is
"http://[servername]" . Is this the same problem?
View Replies
View Related
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
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.
View Replies
View Related
I have the following in an ASP script:
var bounceBackPage = Request.ServerVariables("HTTP_REFERER");
Response.Write("<p>bounceBackPage: " +
bounceBackPage + ". Undefined? " +
(bounceBackPage == "undefined") + " </p>");
When I enter the page URL by itself, I expect HTTP_REFERER to be undefined.. but this is the output I get:
bounceBackPage: undefined. Undefined? false . How can it print "undefined" and still return false for bounceBackPage == "undefined"?
View Replies
View Related
I have created a feedback form that uses, among other things, the HTTP_REFERER server variable, which appears in the e-mail that gets generated when the form is submitted. I would prefer to have the form appear in a pop-up window, which is called via a javascript function. However, at least in IE 5 Win, the referer header does *not* get sent when a user clicks on the feedback link (FWIW, it does in IE 5 Mac).
My workaround has been to have the form open in a new, "regular" window (target=_blank).
Is this issue present in later versions of IE Win? Is there another approach that would allow me to have my feedback form in a pop-up window?
View Replies
View Related
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
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.
View Replies
View Related
I have a basic script that allows broadband to be turned on/off from anypage on a site. What I have done is used HTTP_REFERER to redirect the user back to page they were on once the needed server variable is set.
But since Firewalls such as Norton block HTTP_REFERER variable the script is falling on its face. Currently I just redirect them to the home page is HTTP_REFERER returns blank but I'm wondering if anyone can think of a workaround or have read anywhere about one.
View Replies
View Related
I have create a website that links to other websites, using a response.redirect("URL_OF_WEBSITE") For some reason I have managed to get on top at Google, with these pages that only redirect to a website of an affiliate program of mine. The problem now is that the affiliate program thinks that Google is the referer instead of me. What can I do to prevent this.
Is there a way to somehow alter the change the HTTP_REFERER when I use Response.redirect?
This is an example: ....
View Replies
View Related
Can one reliably use http_referer to track a user page selections as I appear to be getting BLANK values? I have read that company firewalls etc block this method....
View Replies
View Related
Pretty simple task ... page1.asp calls page2.asp and I want page2.asp to show the HTTP_REFERER (which I expect to be page1.asp).
It's blank when I try from my local machine and from other machines. HTTP_HOST, URL and various other server variables work fine so there is a work around, but I'd like to know why HTTP_REFERER doesn't seem to work
View Replies
View Related
I have a form that I use to submit feedback to a database. The form can be called from any number of pages and I track the page that has opened the form using the server variable, HTTP_REFERER.
A user does have the option of submitting multiple feedback messages by filling out the form multiple times and clicking submit for each (there are different categories that can be chosen on the form itself that make this obvious).
The problem is that on submissions after the first, HTTP_REFERER no longer refers to the original opener but to the feedback page (since the user returns to the feedback page) . How can I capture and keep the original HTTP_REFERER? Code:
View Replies
View Related
i'm trying to prevent users from entering any information in the addressbar. so, i put this code in here to make any pages redirect:
If Request.ServerVariables("HTTP_REFERER")="" Then
Response.Redirect("search.asp?")
End If
this is not working though. when using firefox, it says the page is not redirecting properly. what am i doing wrong?
View Replies
View Related
I'm using:
Request.ServerVariables("HTTP_REFERER")
And apparently this isn't "reliable" anymore? As in, some
browsers/firewalls don't allow it? A small block of my code is based on
knowing what page you were previously on, so this would be a problem. Any
ideas?
View Replies
View Related
HTTP_REFERER and Response.Redirect is returning an empty string, anybody knows a workaround?
View Replies
View Related
Using IIS 5.0 and sometime some asp pages (absolutely
randomly) showing as blank white pages. So far only one
way of fixing it - restart whole server. Restarting IIS,
or specific web server not helping, only whole server.
I enable server side and client side debugging, but no
errors showing up...
In view source pages always look like this:
-----------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1251"></HEAD>
<BODY></BODY></HTML>
-----------------------
Any idea why it can happened and how to fix?
View Replies
View Related
When my webserver does not process a user's change because of an invalid password, I inform the user and I want to present them a button for a retry:
<TR id=continuebuttonrow>
<td width="05%"> </td>
<TD width="90%" align=center valign=middle colspan=2>
<BUTTON TYPE=BUTTON
ONCLICK="location.href='<% =Request.ServerVariables("HTTP_REFERER") %>';"
class=btnParms name=btnContinue ID="Button3">Try Again (Back)</BUTTON>
</td>
Yet if this button is clicked, they go back to the server and the page is refreshed with original values.
If I click the browser's BACK button (rather than my button above), I go back to the page (from cache I guess) I want (because it contains the user changes). Here I can correct the password without having to rekey the changes.
So, what is the Request.Servervariable needed for the equivalent of the BACK button?
View Replies
View Related
I have a "Email this page to a friend" form that submits to itself and contains the hidden input value="<%= Request.ServerVariables("HTTP_REFERER") %>".
The value="<%= Request.ServerVariables("HTTP_REFERER") %>" is to obtain the URL of the page that the person wishes to send.
The problem is, if someone creates an error in any of the input fields, the page submits to itself again and displays the errors. When this happens, the original HTTP_REFERER url address is lost and now replaced with the url of the "Email this page to a friend" page.
Is there a way to retain the original HTTP_REFERER value even though the user refreshes the page?
View Replies
View Related
Found this funny error on a clients computer the "request.ServerVariables("HTTP_REFERER")" does not show any information on the previous address of the last webpage visited. The computer does how every show the details of "request.ServerVariables("ALL_HTTP")".
I can't seem to be able to duplicate the problem on my computer. Does any one have any ideas why this might be happening?
View Replies
View Related
I am trying to write a small banner system and I am trying to get the page from where the banner is displayed. I have tried this piece of code:-
page = Request.ServerVariables("HTTP_REFERER")
however with IE6, it does not work and gives me a blank variable.
Is there a way round this?
View Replies
View Related
I am trying to determine the URL that a person arrived at my site from using Request.ServerVariables("HTTP_REFERER").
However in all cases it gives its own site, not the site that linked to it.
I know this isn't guaranteed to be provided, so is there some other way to determine where a 'hit' came from.i.e so I can tell if it came from a search engine, from a link or drectly typed in.
View Replies
View Related
I am always getting cached pages even contents of the page changed on the server but I am getting old page (data).How to solve this.
View Replies
View Related
is it possible to create pages using other pages. Here is an example... Can I make a page that has a menu on it, but the menu is actually a seperate page that I call with ASP?
View Replies
View Related