note 89883 deleted from reserved.variables.server by danbrown
| From: | danbrown@php.net | Date: | Thu, 26 Mar 2009 23:17:25 +0000 |
| Subject: | note 89883 deleted from reserved.variables.server by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-152504@lists.php.net to get a copy of this message | ||
Note Submitter: spambegone at cratemedia dot com
----
It is also useful to note, that if you are using Apache rewrite (to manipulate random URI paths to a
core php file that runs your CMS), and you are in SSL mode, browsing with IE (6 or 7),
$_SERVER["REQUEST_URI"] has odd properties. If you save that variable to a session, e.g.
$_SESSION["last_page"] = $_SERVER["REQUEST_URI"];
And then you try to access that session variable on the next page, the variable will have
mysteriously changed. Notably, a part of the path will be missing, and in it's place will be
the string "/://0", e.g.
Original Variable: /site/admin/menu/edit/
Retrieved from Session: /site/admin/menu/://0
I would very much like to know why, but I couldn't find this behavior documented anywhere. It
also affects, $_SERVER["REDIRECT_URL"]. My work around for now, is to avoid using a
SESSION to store the current page, and instead use the $_SERVER["HTTP_REFERER"]. But then
I have to strip out the protocol and domain to get the part that I want.
If anyone knows the reason for this, can you email me?