httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Malo ...@perlig.de>
Subject Re: [users@httpd] Question about RequestHeader and Apache's use of Environment Variables
Date Thu, 01 Jul 2004 20:21:10 GMT
* Joshua Slive <jslive@gmail.com> wrote:

> First, the ability to use %e in RequestHeader is a very recent feature
> addition.  It is not documented in 2.0, and I haven't checked the
> code, so it may only be available in the dev version (2.1).

It's available in 2.0 as well. Same code, just another header table.
(note to self: docs update ;-)

> Second, most of the things we think of as CGI env variables only
> really become env variables when a CGI script or SSI page is called. 
> Modules like mod_rewrite access this information directly from
> internal apache structures not from env variables.  But if mod_rewrite
> can access it, you can convert it to an env variable, using something
> like
> 
> RewriteCond %{REMOTE_PORT} (.*)
> RewriteRule .* - [E=R_P:%1]
> 
> RequestHeader add R-P %{R_P}e
> 
> But, as I said, I don't think this will work in any 2.0 version.

Fortunately the access to REMOTE_PORT was added to mod_rewrite recently, so
it should just work that way since 2.0.49.

nd
-- 
"Solides und umfangreiches Buch"
                                          -- aus einer Rezension

<http://pub.perlig.de/books.html#apache2>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message