Flights - Modded Xbox - Rapidshare eBooks Download - Payday Loans - Lingerie

PDA

View Full Version : Apache 2 mod_rewrite: SetEnv and RewriteCond


purba
Jul 20th 2006, 4:39 am
Hi!

I'm trying to set Environment variable as a condition to Rewrite.

If we use Rewrite's "native" variable like %{REMOTE_HOST}, everything works perfect, but when we try to use ENV variable:

SetEnv VAR1 v1value
RewriteCond %{ENV:VAR1} ^1$
RewriteRule ^(.*)$ http://192.168.0.183/$1

In rewrite log appears the following mesage:

RewriteCond: input='' pattern='^1$' => not-matched

this means that RewriteCond does not actually "see" this variable.


If we use SetEnvIf instead of SetEnv, it works OK.

Any ideas of What the problem can be?