Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

SetEnv + RewriteCond

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Problems with subdomain in 'server.foo.com'  
Author Message
maxim

External


Since: Dec 09, 2003
Posts: 1



(Msg. 1) Posted: Tue Dec 09, 2003 11:18 pm
Post subject: SetEnv + RewriteCond
Archived from groups: alt>apache>configuration (more info?)

I'm triyng to use envirment variables in RewriteCond's, something like this

<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:maxim@mtu.ru

 >> Stay informed about: SetEnv + RewriteCond 
Back to top
Login to vote
jring

External


Since: Jun 30, 2003
Posts: 154



(Msg. 2) Posted: Sat Dec 13, 2003 8:48 pm
Post subject: Re: SetEnv + RewriteCond [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > I'm triyng to use envirment variables in RewriteCond's, something like this
 >
 > <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

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<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: SetEnv + RewriteCond 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Setenv with a dynamic variable - Hi all, I would like to use Setenv directive like this : SetEnv USER_AUTH ${SSL_CLIENT_S_DN_Email} but the result is "${SSL_CLIENT_S_DN_Email}" (with phpinfo) and not the email. Can someone help me ? Thanks!
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]