"The problem I'm facing here seems to rely in the fact that the variables I'm trying to use (like "THE_REQUEST", for example) are only defined within mod_rewrite's scope, and are not available to other directives like SetenvIf."
And i dont think this is correct i have used SetEnvIf with REQUEST_URI before.
Do you have SetEnvIf and Location togather in the config? Remove the Location one and leave the SetEnvIf only to catch the env var for the header. I read somewhere a case when LocationMatch was affecting SetEnvIf.
On Mar 23, 2012 1:26 AM, "Bruno Tréguier" <Bruno.Treguier@xxxxxxx> wrote:Le 22/03/2012 11:11, Igor Cicimov a écrit :
Why don't you just do it this way:
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/ [OR]
RewriteCond %{REQUEST_URI} !^/onlinestore/checkout
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [L]
and solve your rewrite problem?
Because the path /onlinestore/checkout is not an exception to the rule, and also has to be dealt with by the "index.php" catch-all script.
I just want to conditionally set a header in the HTTP response, based on the original URI, before it is fiddled with by rewriting process.
The problem I'm facing here seems to rely in the fact that the variables I'm trying to use (like "THE_REQUEST", for example) are only defined within mod_rewrite's scope, and are not available to other directives like SetenvIf.
Regards,
Bruno
--
- Service Hydrographique et Oceanographique de la Marine - DMGS/INF
- 13, rue du Chatellier - CS 92803 - 29228 Brest Cedex 2, FRANCE
- Phone: +33 2 98 22 17 49 - Email: Bruno.Treguier@xxxxxxx
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx