Print Page | Close Window

Get page from where the users come

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=1489
Printed Date: 29 March 2026 at 8:42am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Get page from where the users come
Posted By: eagle00789
Subject: Get page from where the users come
Date Posted: 30 March 2003 at 1:41pm

How to get the pageurl from where the users are comming to fill out a special page with the coming from already filled in.
it has to be limmited to pages inside my webpage

greetings chris



-------------
Using forum at http://www.gravenrode.nl/forum/forum - Gravenrode and http://www.gravenrode.nl/forum/test_forum - here and http://217.121.39.22/forum/test_forum - here



Replies:
Posted By: michael
Date Posted: 30 March 2003 at 2:38pm
you can use the Request.ServerVariables("HTTP_Referrer") if it has been send there by a link or so.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: eagle00789
Date Posted: 30 March 2003 at 2:45pm

thx
wil try it now

greetings chris



-------------
Using forum at http://www.gravenrode.nl/forum/forum - Gravenrode and http://www.gravenrode.nl/forum/test_forum - here and http://217.121.39.22/forum/test_forum - here


Posted By: eagle00789
Date Posted: 30 March 2003 at 2:51pm

for testing purposes i used:

-------------

<html>
<body>
<p>test</P>
<%
dim test
test = Request.ServerVariables("HTTP_Referrer")
response.write(test)
%>
</body>
</html>

------------

but it doesn't work. the page just says test and that's it



-------------
Using forum at http://www.gravenrode.nl/forum/forum - Gravenrode and http://www.gravenrode.nl/forum/test_forum - here and http://217.121.39.22/forum/test_forum - here


Posted By: Bunce
Date Posted: 30 March 2003 at 4:57pm

HTTP_Referrer is not very reliable. It can be blocked by ISP's browsers etc.

There's no reliable way that I know of to get the referrer.

That said, even if it wasn't working, your page shouldn't output 'test' if you are using the code you posted above. It will either show an error, or a blank screen or the referrer.

If it showed 'test' then there's something wrong with your code.

Cheers,
Andrew



-------------
There have been many, many posts made throughout the world...
This was one of them.


Posted By: eagle00789
Date Posted: 30 March 2003 at 10:33pm
there is nothing wrong with my code because of the <p>test</p> directly above the <%...</html> code

-------------
Using forum at http://www.gravenrode.nl/forum/forum - Gravenrode and http://www.gravenrode.nl/forum/test_forum - here and http://217.121.39.22/forum/test_forum - here


Posted By: Bunce
Date Posted: 30 March 2003 at 11:07pm

lol, sorry eagle!

I saw the variable name (test) and thought you must have put it in quotes or something.

It isn't coming though then. As I said its not reliable.

Whoops, hang on, try Referer with ONE 'R'. Its a common gotchya.

If that doesn't work then try running one of the script which shows a lit of all the server variables that ARE coming through:
http://www.asp101.com/samples/servvars.asp - http://www.asp101.com/samples/servvars.asp

Hope this helps,
Andrew



-------------
There have been many, many posts made throughout the world...
This was one of them.


Posted By: eagle00789
Date Posted: 31 March 2003 at 12:18am

well, i tried to use the code below but i doesn't said HTTP_REFERER. Does this mean that i cant use it?? or do i have to install the .net framework on the server (if i install it, do i have to reboot the server??)

------ test.asp ------

<html>
<body>
<p>test</P>
<%
Dim Item
%>
<p><% For Each Item In Request.ServerVariables %></p>
<p><%= Item %>=<%= Request.ServerVariables(Item) %></P>
<% Next %>

</body>
</html>

---------------------------

------ output from the above script ------

test

ALL_HTTP=HTTP_ACCEPT:*/* HTTP_ACCEPT_LANGUAGE:nl HTTP_CONNECTION:keep-alive HTTP_HOST:www.gravenrode.nl HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; T312461) HTTP_PRAGMA:no-cache HTTP_COOKIE:ForumVisit=LastVist=37705%2C3576273148; FLVST=LTVST=37711%2C3702893518; ASPSESSIONIDGGQQGFMU=LLIFAAICILLHLMENDNCHHJHN HTTP_VIA:HTTP/1.0 inktomi1-cluster[0A016135] (Traffic-Server/5.1.3 [uNcM]) HTTP_CLIENT_IP:217.105.152.77

ALL_RAW=Accept: */* Accept-Language: nl Connection: keep-alive Host: www.gravenrode.nl User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; T312461) Pragma: no-cache Cookie: ForumVisit=LastVist=37705%2C3576273148; FLVST=LTVST=37711%2C3702893518; ASPSESSIONIDGGQQGFMU=LLIFAAICILLHLMENDNCHHJHN Via: HTTP/1.0 inktomi1-cluster[0A016135] (Traffic-Server/5.1.3 [uNcM]) Client-ip: 217.105.152.77

APPL_MD_PATH=/LM/W3SVC/1/ROOT

APPL_PHYSICAL_PATH=c:\inetpub\wwwroot\

AUTH_PASSWORD=

AUTH_TYPE=

AUTH_USER=

CERT_COOKIE=

CERT_FLAGS=

CERT_ISSUER=

CERT_KEYSIZE=

CERT_SECRETKEYSIZE=

CERT_SERIALNUMBER=

CERT_SERVER_ISSUER=

CERT_SERVER_SUBJECT=

CERT_SUBJECT=

CONTENT_LENGTH=0

CONTENT_TYPE=

GATEWAY_INTERFACE=CGI/1.1

HTTPS=off

HTTPS_KEYSIZE=

HTTPS_SECRETKEYSIZE=

HTTPS_SERVER_ISSUER=

HTTPS_SERVER_SUBJECT=

INSTANCE_ID=1

INSTANCE_META_PATH=/LM/W3SVC/1

LOCAL_ADDR=217.105.152.112

LOGON_USER=

PATH_INFO=/test.asp

PATH_TRANSLATED=c:\inetpub\wwwroot\test.asp

QUERY_STRING=

REMOTE_ADDR=212.178.7.53

REMOTE_HOST=212.178.7.53

REMOTE_USER=

REQUEST_METHOD=GET

SCRIPT_NAME=/test.asp

SERVER_NAME=www.gravenrode.nl

SERVER_PORT=80

SERVER_PORT_SECURE=0

SERVER_PROTOCOL=HTTP/1.0

SERVER_SOFTWARE=Microsoft-IIS/5.0

URL=/test.asp

HTTP_ACCEPT=*/*

HTTP_ACCEPT_LANGUAGE=nl

HTTP_CONNECTION=keep-alive

HTTP_HOST=www.gravenrode.nl

HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; T312461)

HTTP_PRAGMA=no-cache

HTTP_COOKIE=ForumVisit=LastVist=37705%2C3576273148; FLVST=LTVST=37711%2C3702893518; ASPSESSIONIDGGQQGFMU=LLIFAAICILLHLMENDNCHHJHN

HTTP_VIA=HTTP/1.0 inktomi1-cluster[0A016135] (Traffic-Server/5.1.3 [uNcM])

HTTP_CLIENT_IP=217.105.152.77

------ end output ------



-------------
Using forum at http://www.gravenrode.nl/forum/forum - Gravenrode and http://www.gravenrode.nl/forum/test_forum - here and http://217.121.39.22/forum/test_forum - here


Posted By: Bunce
Date Posted: 31 March 2003 at 3:51am

You don't need the framework.

Perhaps it didn't show up because you didnt navigate TO that page *from* another (refering) page.

If it still doesn't work, and you've made sure that you've spelt 'REFERER' correctly in you script, it might pay to search google as I know there are issues with it being bloked by certain ISP or servers.

Cheers,
Andrew



-------------
There have been many, many posts made throughout the world...
This was one of them.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net