Is there a way to put an environment variable in the condPattern part of a RewriteCond? Here is what i tried:

RewriteCond %{REQUEST_URI} /%{ENV:ALIAS}/(js|css|img).*
RewriteRule (.*) - [L,NS]

But this is interpreted literally by apache (it tries to match %{ENV:ALIAS} instead of the content of that environment variable.

How can i acomplish this?

Bye!

link|improve this question
1  
Can you clarify how you found that it's trying to match it literally? If you've confirmed that, you must have a rewrite log - can you share it? – Shane Madden Feb 6 at 22:58
1  
2nd argument of RewriteCond directive should be either regex matching pattern or exact string (when lexicographical comparison is used). Variable replacement (%{VAR}) does not work there. – LazyOne Feb 7 at 1:57
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.