Re: How to set environment variable from RewriteMap? (was Re: [users@httpd] mod_rewrite E flag does not set env. variable)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 10, 2008 at 1:44 PM, Thorsten Scherler
<thorsten.scherler.ext@xxxxxxxxxxxxxxxxxxx> 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...

Krist

-- 
krist.vanbesien@xxxxxxxxx
krist@xxxxxxxxxxxxx
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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux