Is there anyway to use the value set in a SetEnv on the RewriteRule statement?
Example:
SetEnv MY_SCRIPT myScript.php
rewriteEngine on
RewriteRule ^(.*)$ %{MY_SCRIPT} [L]
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
According to http://httpd.apache.org/docs/2.0/env.html the SetEnv is called after the RewriteRule. Therefore it seems to be impossible to use any variable set via SetEnv in a RewriteRule- or RewriteCond-statement.
Using SetEnvIf on the other hand is called before the RewriteRule and therefore Variables set there can be used in a RewriteRule- or RewriteCond-statement.
So something like the following should work: