httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Malo>
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 <> 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.

"Solides und umfangreiches Buch"
                                          -- aus einer Rezension


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message