note 115427 deleted from reserved.variables.server by salathe
| From: | salathe@php.net | Date: | Tue, 22 Jul 2014 08:03:48 +0000 |
| Subject: | note 115427 deleted from reserved.variables.server by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-200020@lists.php.net to get a copy of this message | ||
Note Submitter: Manasi
----
I am using PHP 5.4.12 compiled as an apache module.
Server API Apache 2.0 Handler
GATEWAY_INTERFACE CGI/1.1
However, $_SERVER was not returning the headers set with RequestHeader apache directive in .htaccess
file.
I added the following to .htaccess instead to make the values available:
RewriteEngine on
RewriteRule .* - [E=HTTP_X_FORWARDED_FOR:%{HTTP_X_FORWARDED_FOR}]
RewriteRule .* - [E=HTTP_CUSTOM_HEADER:value]