note 68644 rejected from reserved.variables by philip
| From: | philip@php.net | Date: | Wed, 21 Feb 2007 15:52:02 +0000 |
| Subject: | note 68644 rejected from reserved.variables by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-123639@lists.php.net to get a copy of this message | ||
Note Submitter: Jake
----
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?