httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject Re: [users@httpd] How to set environment variable from RewriteMap? (was Re: [users@httpd] mod_rewrite E flag does not set env. variable)
Date Tue, 11 Mar 2008 07:37:12 GMT
On Mon, 2008-03-10 at 14:01 +0100, Krist van Besien wrote:
> On Mon, Mar 10, 2008 at 1:44 PM, Thorsten Scherler
> <> wrote:
> >  RewriteMap portadaboja txt:/opt/datos/httpd/redirect.txt
> >  SetEnv FOCUS ${portadaboja:boletin}
> >
> >  but the variable will the return the literal context. Meaning
> >  ${portadaboja:boletin} and not the result of this expression.
> That expression will only be evaluated in the context of a RewriteRule
> or a RewriteCond

I thought so, thanks for clarification.

> >  Does somebody has an idea how I can save either whether a rewrite had
> >  happened or the result of the rewriteMap expression.
> If you want to save that information during request processing you can
> use an environment variable, just like you did. If you want to save
> information from one request to another you need another mechanism.

Which mechanism would you suggest?

> However, you are doing the following:
> RewriteRule "^/BOJA$"
> "http://%{HTTP_HOST}/boja/${portadaboja:boletin}" [E=FOCUS:true,L]
> (now with L as you mentioned, however that makes the
> http://%{HTTP_HOST} completely superfluous)
> That means that your SSI processing will happen inside a file whose
> name is the result of the rewrite map. So you know what the result is,
> don't you? You're getting it as part of the URL...

Well, like I said the other mail: "L flag, that is working just fine
however that is not solving my problem, since I depending on a rewrite
of the url."

Thanks very much for explaining.

Thorsten Scherler                       
Open Source Java                      consulting, training and solutions

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