You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Akins <ba...@web.turner.com> on 2004/02/11 21:29:01 UTC
SetEnv and other modules
Any reason Apache does not allow this:
SetEnv ORIGIN 1234
RewriteRule /this.html
http://that.domain.com/this.html?origin=${ENV:ORIGIN} [R,L]
The environment variable from setenv is not seen by other variables.
Should it be? Is this on purpose?
I'm just wondering if I need to hack up my own environment setter...
--
Brian Akins
Senior Systems Engineer
CNN Internet Technologies
Re: SetEnv and other modules
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Brian Akins wrote:
> Any reason Apache does not allow this:
> SetEnv ORIGIN 1234
SetEnv doesn't really set the environment by itself. by itself, it sticks
ORIGIN in the subprocess_env table during fixups. later modules (like
mod_cgi) make calls during content-generation to propagate the
subprocess_env table to the environment. this is important because...
>
> RewriteRule /this.html
> http://that.domain.com/this.html?origin=${ENV:ORIGIN} [R,L]
RewriteRule operates during the translation phase. at this point, SetEnv
settings are still private to mod_env and not part of either the
subprocess_env table or %ENV.
HTH
--Geoff