httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor" <>
Subject [users@httpd] SetEnv variables empty for mod_rewrite
Date Wed, 02 Jun 2004 02:59:03 GMT
I'm trying to set an environment variable from httpd.conf and access it
from mod_rewrite statements, but I'm not having any luck.  If I use
SetEnvIf instead it works fine.  Below is a sample where I'd expect
MyVariable to be set to "foo", but if I examine the rewrite.log file,
the variable is always empty.  I must be doing something wrong, because
this seems so basic.  Thanks in advance for any help.




LoadModule env_module modules/

LoadModule rewrite_module modules/


SetEnv MyVariable foo

RewriteEngine on

RewriteLog logs/rewrite.log

RewriteLogLevel 9

RewriteCond %{ENV:MyVariable} foo

RewriteRule ^(.+)

View raw message