note 68644 added to reserved.variables
| From: | Jake at osu1 dot php dot net | Date: | Fri, 04 Aug 2006 16:30:57 +0000 |
| Subject: | note 68644 added to reserved.variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115553@lists.php.net to get a copy of this message | ||
I have a question about the $_SERVER variable.
I want to make my error pages show up what request forced an error.
i.e. if the user types http://www.myserver.com/nonexistingdir/
the error handler should retrieve that the user tried to access http://www.myserver.com/nonexistingdir/
which is not available.
Using the variables brings:
$_SERVER["REQUEST_URI"] -> http://www.myserver.com/ErrorHandler/404.php
$_SERVER["HTTP_REFERER"] -> http://www.myserver.com/ErrorHandler/404.php
$_SERVER["REDIRECT_URL"] -> http://www.myserver.com
but I need http://www.myserver.com/nonexistingdir/ as output
(which means exactly that what the user used to trigger the 404 error)
Anyone an idea how to solve this?
----
Server IP: 217.160.72.57
Probable Submitter: 85.233.33.148
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.php
Edit -- https://master.php.net/note/edit/68644
Del: integrated -- https://master.php.net/note/delete/68644/integrated
Del: useless -- https://master.php.net/note/delete/68644/useless
Del: bad code -- https://master.php.net/note/delete/68644/bad+code
Del: spam -- https://master.php.net/note/delete/68644/spam
Del: non-english -- https://master.php.net/note/delete/68644/non-english
Del: in docs -- https://master.php.net/note/delete/68644/in+docs
Del: other reasons-- https://master.php.net/note/delete/68644
Reject -- https://master.php.net/note/reject/68644
Search -- https://master.php.net/manage/user-notes.php