httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krist van Besien" <>
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 Mon, 10 Mar 2008 13:01:52 GMT
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

>  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.

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...


Bremgarten b. Bern, Switzerland
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

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