I set an environment variable in httpd-vhosts.conf
SetEnv EARLY_VAR 1
I try setting special rules based on its value in
If you found problem with SetEnv and SetEnvIf in your Apache configuration.
Set the variable in httpd.conf
file as below
SetEnvIf Host ".*" EARLY_VAR=1
SetEnvIf Host eval EARLY_VAR=1
SetEnvIf Host dev EARLY_VAR=1
It assign the value in all type of server (production ,evaluation or development)
Now you can use your variable in .htaccess
file.
SetEnv TEST_VAR if_value
SetEnv TEST_VAR else_value