<VirtualHost>
RewriteEngine on
SetEnv switch true
RewriteCond %{ENV:switch} ^true$
RewriteRule ^.*xxx.*$ /toxxx/ [R,L]
...
</VirtualHost>
But this is not working. What can be wrong?
Thanx
--
Best regards,
Maxim Cherniavsky
mailto:ma...@mtu.ru
if you set those env-variables yourself with mod_env, the result
depends on the execution order of the modules, which for apache 1.3 is
the reverse loading/adding order (added/loaded last modules get their
go first) and afaik with apache2 is mostly fixed in the module source
(not shure here wether it's always fixed and how it can be changed).
so with 1.3 you might experiment with moving mod_env to the bottom of
the LoadModule and/or AddModule lists and retry, or you set the
environment variable with mod_rewrite (see [E=variable:value] flag to
RewriteRule), which should work in any case.
joachim