Problem with HTTP_REFERER and the Navigation
Problem with HTTP_REFERER and the Navigation
I have a strange Problem:
Please go to http://www.iagcp.org enter the site and click on "Member Area". The Name and the Password are "test". You see a list of countries.
The 4th Line on the screen is a link labled "Hotels". Click on it. On the resulting page you see that HTTP_REFERER is OK.
Go back. Click on "Member Hotels" in the Navigation (exact same href as the link before). On my Mac you get exactly the same result as before with the link. On Windows with IE6 you get an empty referer (and the page doesn't work).
What is happening with HTTP_REFERER when using IE6? And why only in the navigation and not with a standard link?
Cache is off for "Member Area", "Member Hotels" and "Member Clubs" for both - the articles and in the structure.
Any ideas?
Florian
Please go to http://www.iagcp.org enter the site and click on "Member Area". The Name and the Password are "test". You see a list of countries.
The 4th Line on the screen is a link labled "Hotels". Click on it. On the resulting page you see that HTTP_REFERER is OK.
Go back. Click on "Member Hotels" in the Navigation (exact same href as the link before). On my Mac you get exactly the same result as before with the link. On Windows with IE6 you get an empty referer (and the page doesn't work).
What is happening with HTTP_REFERER when using IE6? And why only in the navigation and not with a standard link?
Cache is off for "Member Area", "Member Hotels" and "Member Clubs" for both - the articles and in the structure.
Any ideas?
Florian
Hello Pappnase,
thanks for your fast answer. The content part is "ext. content".
I use the HTTP_REFERER to find out where the user is coming from: I he is coming from "somwhere else" I redirect him to the password page. If he is coming from "inside" then he has already entered the correct password and I simple show the requested page.
Again, everything works with Safari/Firefox/Camino on the Mac and with Firefox on Windows. The HTTP_REFERER is empty with IE6 on windows, but only if I click on "Member Hotels" in the navigation. If I use the selfmade link the HTTP_REFERER is correct. So I think it is neither a problem of the browser not of my PHP script but a problem with the phpwcms navigation and IE6.
What's happening there?
Florian
thanks for your fast answer. The content part is "ext. content".
I use the HTTP_REFERER to find out where the user is coming from: I he is coming from "somwhere else" I redirect him to the password page. If he is coming from "inside" then he has already entered the correct password and I simple show the requested page.
Again, everything works with Safari/Firefox/Camino on the Mac and with Firefox on Windows. The HTTP_REFERER is empty with IE6 on windows, but only if I click on "Member Hotels" in the navigation. If I use the selfmade link the HTTP_REFERER is correct. So I think it is neither a problem of the browser not of my PHP script but a problem with the phpwcms navigation and IE6.
What's happening there?
Florian
- Oliver Georgi
- Site Admin
- Posts: 9914
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
sounds like norton firewall/internet security.
Do not use Referer var of PHP - try
Oliver
Do not use Referer var of PHP - try
Code: Select all
$_SESSION['REFERER_URL']
$_SERVER["REFERER_URL"]
hi,
I read this article and testet $_SERVER["REFERER_URL"] in my phpwcms project. it doesn't work. the var is empty.
I tried a lot of things to save the referer-url for the next site.
see my question: http://www.phpwcms.de/forum/viewtopic.php?t=8234 .
another possibility, I think, is to save the url in a session-var. but it doesn't works too. for my understanding: I excpect, session is activated from phpwcms-system? or should I start in header with session_start() (on the otherside - I also tried this without success)?
do you have a tip for me?
thanks,
susi
I read this article and testet $_SERVER["REFERER_URL"] in my phpwcms project. it doesn't work. the var is empty.
I tried a lot of things to save the referer-url for the next site.
see my question: http://www.phpwcms.de/forum/viewtopic.php?t=8234 .
another possibility, I think, is to save the url in a session-var. but it doesn't works too. for my understanding: I excpect, session is activated from phpwcms-system? or should I start in header with session_start() (on the otherside - I also tried this without success)?
do you have a tip for me?
thanks,
susi
- Oliver Georgi
- Site Admin
- Posts: 9914
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
- Oliver Georgi
- Site Admin
- Posts: 9914
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
in current release phpwcms is opening a session for each user. So you can store current site and take over session var as Referer value:
check and enhance thisn peace of code
Oliver
check and enhance thisn peace of code
Code: Select all
define('ACTIVE_REFERER', empty($_SESSION['REFERER_URL']) ? PHPWCMS_URL.'index.php?'.$_SERVER['QUERY_STRING'] : $_SESSION['REFERER_URL']);
$_SESSION['REFERER_URL'] = PHPWCMS_URL.'index.php?'.$_SERVER['QUERY_STRING'];
hi oliver,
thanks for answere, but I don't understand what you mean (sorry, I'm not very experienced)
I implemented your piece of code and I get the actual URL. it's the same result as I tried it with $GLOBALS['_SERVER']['REQUEST_URI'].
so, I tried then to store it in session with:
session_start();
define('ACTIVE_REFERER', empty($_SESSION['REFERER_URL']) ? $PHPWCMS_URL.'index.php?'.$_SERVER['QUERY_STRING'] : $_SESSION['REFERER_URL']);
$_SESSION['REFERER_URL'] = $PHPWCMS_URL.'index.php?'.$_SERVER['QUERY_STRING'];
$url = $_SESSION['REFERER_URL'];
session_register("url");
but it seems so, the var will not store in session. when I call var in next site, I get nothing....

thanks for answere, but I don't understand what you mean (sorry, I'm not very experienced)

I implemented your piece of code and I get the actual URL. it's the same result as I tried it with $GLOBALS['_SERVER']['REQUEST_URI'].
so, I tried then to store it in session with:
session_start();
define('ACTIVE_REFERER', empty($_SESSION['REFERER_URL']) ? $PHPWCMS_URL.'index.php?'.$_SERVER['QUERY_STRING'] : $_SESSION['REFERER_URL']);
$_SESSION['REFERER_URL'] = $PHPWCMS_URL.'index.php?'.$_SERVER['QUERY_STRING'];
$url = $_SESSION['REFERER_URL'];
session_register("url");
but it seems so, the var will not store in session. when I call var in next site, I get nothing....

- Oliver Georgi
- Site Admin
- Posts: 9914
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
you need PHP experience to have it working. Your code is not nice. I can not see what you really want to do. if I set
$_SESSION['varname'] then THIS is the session var you have access on. So use it like
Oliver
$_SESSION['varname'] then THIS is the session var you have access on. So use it like
Code: Select all
echo $_SESSION['varname'];