I have many redirects on the VM web server, which work when viewing the server with a built-in navigator (iceweasel). But this does not work when accessing the server from the browsers of the hosting machine (checked using FF4 / IE8 / Chrome / Opera11).
All experienced redirection methods lead to an "inaccessible or overloaded" server in hosting browsers.
If you can take a look at the headers of the apache logs and give some clues about the differences (the main one looks like a GET URL provided that the same code works):
A work request leads to this log:
cat /var/log/apache2/access.log | grep 127 | grep random | tail -n1 127.0.0.1 - authuserid [26/Jun/2011:11:11:52 +0200] "GET /index.php?page=100 HTTP/1.1" 200 49151 "https://www.mydomain.foo/index.php?page=100&new_session=a4da9106dba2ffd40345a5eb624d7788&random=c0117685e7e65a307989c219efc587b4&sid=n7en2it41h2gumrcq3kmmil3c0&sidf=.ps_AWDkIY" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.19) Gecko/2011050718 Iceweasel/3.0.6 (Debian-3.0.6-3)"
Not working request leads to this log:
cat /var/log/apache2/access.log | grep 192 | grep random | tail -n1 www.mydomain.org:80 192.168.XY - authuserid [26/Jun/2011:11:08:07 +0200] "GET /index.php?page=100&new_session=a4da9106dba2ffd40345a5eb624d7788&random=685de8bcd4d198d6ad7f3cf4b23de5b7 HTTP/1.1" 302 - "http://www.mydomain.foo/index.php?page=xyz" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"
I can not show the response of the header, because I do not receive the answer and the apache error (loglevel = error) is not reported.
thanks
Actions taken:
I increased the browsers timeout (FF: network.http.keep-alive.timeout to 3600s: no change.
I checked that the headers had not been redirected before: ok (dump headers_sent () does not display the sent headers or an empty line or a space in include,)
I increased the Apache server timeout just in case: no change
I made sure to use an absolute HTTP / 1.1 URL. I tried php, html meta and js redirect: no change
EDIT 1:
Here are the headers seen by LiveHTTPHeaders in the "non-working" case:
http://www.mydomain.org/menus/noeud4.php
POST / menus / noeud4.php HTTP / 1.1
Host: www.mydomain.org
User-Agent: Mozilla / 5.0 (Windows NT 6.1; WOW64; rv: 2.0.1) Gecko / 20100101 Firefox / 4.0.1
Accept: text / html, application / xhtml + xml, application / xml; q = 0.9, /; q = 0.8
Accept-Language: fr, fr-fr; q = 0.8, en-us; q = 0.5, en; q = 0.3
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-15, utf-8; q = 0.7, *; q = 0.7
Keep-Alive: 3600
DNT: 1
Connection: keep-alive
Referer: http://www.mydomain.org/index.php?page=890
Cookie: PHPSESSID = 4bge5gg1rgkit78k3seqlfcbq2
Authorization: basic aW52aXRlZEBjYW1hY2FzYTp5b3VybXlndWVddEB0b2RheQ ==
Content-Type: application / x-www-form-urlencoded
Content Length: 98
Login = my_superlogin1 & pwd1 = vbigpass3xqz% 40A2L & = 91690 CAPTCHA, & source = noeud4.php &> formulaire_valide = SOUMETTRE
HTTP / 1.1 302 Found
Date: Sun, 26 Jun. 2011 14:17:27 GMT
Server: Apache / 2.2.9 (Debian) DAV / 2 SVN / 1.5.1 mod_fastcgi / 2.4.6 mod_python / 3.3.1 Python / 2.5.2> mod_ssl / 2.2.9 OpenSSL / 0.9.8g PHP / 5.3.3 < w> X-Powered-By: PHP / 5.3.3
Expires: Thu, November 19, 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check = 0, pre-check = 0
Pragma: no-cache
Location: http://www.mydomain.org/index.php?page=100&new_session=a4da9106dba2ffd40345a5eb624d7788
Content-Length: 0
Keep-Alive: timeout = 60
Connection: Keep-Alive
Content-Type: text / html
http://www.mydomain.org/index.php?page=100&new_session=a4da9106dba2ffd40345a5eb624d7788
GET / index.php? Page = 100 & new_session = a4da9106dba2ffd40345a5eb624d7788 HTTP / 1.1
Host: www.mydomain.org
User-Agent: Mozilla / 5.0 (Windows NT 6.1; WOW64; rv: 2.0.1) Gecko / 20100101 Firefox / 4.0.1
Accept: text / html, application / xhtml + xml, application / xml; q = 0.9, /; q = 0.8
Accept-Language: fr, fr-fr; q = 0.8, en-us; q = 0.5, en; q = 0.3
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-15, utf-8; q = 0.7, *; q = 0.7
Keep-Alive: 3600
DNT: 1
Connection: keep-alive
Referer: http://www.mydomain.org/index.php?page=890
Cookie: PHPSESSID = 4bge5gg1rgkit78k3seqlfcbq2
Authorization: basic aW52aXRlZEBjYW1hY2FzYTp5b3VybXlndWVddEB0b2RheQ ==
HTTP / 1.1 302 Found
Date: Sun, 26 Jun. 2011 14:19:59 GMT
Server: Apache / 2.2.9 (Debian) DAV / 2 SVN / 1.5.1 mod_fastcgi / 2.4.6 mod_python / 3.3.1 Python / 2.5.2> mod_ssl / 2.2.9 OpenSSL / 0.9.8g PHP / 5.3.3 X -Powered-By: PHP / 5.3.3
Expires: Thu, November 19, 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check = 0, pre-check = 0
Pragma: no-cache
Location: https://www.mydomain.org/index.php?page=100&new_session=a4da9106dba2ffd40345a5eb624d7788&sid=4bge5gg1rgkit78k3seqlfcbq2&sidf=.ps_Z5wRio
Content-Length: 0
Keep-Alive: timeout = 60
Connection: Keep-Alive
Content-Type: text / html
EDIT2 : Comparing both cases of request / responses (working / non-working), I highlighted the following two main differences:
About the "working" answers:
Status: 200 which I do not have on a "non-working" answer, but I do not understand why.
in the answer "Doesn't work":
DNT: 1
which stands for Do Not Track (me) from FF4 .
So I tried to disable this option, but the same result.
I can skip sthg for sure. Everything looks as if the server is down. Maybe the session cookie (76 kb) is too large. I also tried downgrading firefox 4 to 3.6 since this other one changed the parameter, but I still get the same answer with FF3.6 as FF4.