?
Solved

request.servervariable("HTTP_REFERER")

Posted on 2000-04-10
15
Medium Priority
?
823 Views
Last Modified: 2010-05-18
i have a problem with request.servervariable("HTTP_REFERER")
when i run it it does not show any data
i am using PWS on win98 machine.

0
Comment
Question by:marounk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
  • 2
15 Comments
 
LVL 10

Expert Comment

by:makerp
ID: 2699818
i think that this only has something in if the script has been called form another page . if you type the url in the location bar it will probably be blank. or if the calling page is the samepage as the script.

try putting a link in a html page to your script..
0
 
LVL 1

Expert Comment

by:ATM
ID: 2699984
HTTP_REFERER will return useful data if
Page where You ask for that variable navigated by link, exmpl, You have link:
<A HREF="checkreferer.asp">Check Referer</A>. After click on you can obtain it. Also it will return REFERER if use checkreferer.asp in frames. If REFERER return nothing then that's mean page URL have been directly wrotten in address field of browser. Also in some cases Netscape and Explorer have different behavoir.
0
 
LVL 10

Expert Comment

by:makerp
ID: 2700010
eeemmm i just said that....
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Expert Comment

by:ATM
ID: 2700063
Also if You use <FORM></FORM> REFERER available...
0
 
LVL 1

Author Comment

by:marounk
ID: 2702937
Adjusted points from 20 to 30
0
 
LVL 1

Author Comment

by:marounk
ID: 2702938
what i am getting is now the url of the iframe link.

what i have is an <iframe> in which there is a link that calls an images to be displayed each time so when i click on the image i get the url that calls the image which is in the iframe but i want is the URL of the main page

let us say i am in yahoo.com
and inside it i have this code
<iframe>http://.....</iframe>
when i click i want the yahoo.com what i am getting is the "http://....."
any ideas ???
0
 
LVL 10

Expert Comment

by:makerp
ID: 2715102
are you getting the base url in the http_referer of the frame or the frameset ?..

i dont know how http_referer behaves when you are in a frame.

0
 
LVL 1

Author Comment

by:marounk
ID: 2715360
of the frame there is no frameset
0
 
LVL 10

Expert Comment

by:makerp
ID: 2715384
thats right then .. thats what you should have in the http_referer.

if the link is in a frame thats url is http://test.co.com/test/

then you should have that in http_referer
0
 
LVL 1

Author Comment

by:marounk
ID: 2715839
ok but this not what i want ... i want the page URL !!!!!
0
 
LVL 10

Expert Comment

by:makerp
ID: 2715854
what the url of the page that has been called.....

i.e. if i call http://example.com/test.asp

you want http://example.com/test.asp
in a http variable...

0
 
LVL 1

Author Comment

by:marounk
ID: 2715976
excatly
0
 
LVL 10

Accepted Solution

by:
makerp earned 120 total points
ID: 2716028
okay

Request.ServerVariables("URL") for the base url

SCRIPT_NAME for the script name and the virtual dir

ie.

url = Request.ServerVariables("URL")&Request.ServerVariables("SCRIPT_NAME")

will give you you full url
0
 
LVL 10

Expert Comment

by:makerp
ID: 2716036
sorry i mean

response.write(Request.ServerVariables("SERVER_NAME")&Request.ServerVariables("SCRIPT_NAME"))
0
 
LVL 10

Expert Comment

by:makerp
ID: 2716042
that wont give you the 'http://' bit
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question