Re: Problem when mixing RewriteRules and <Location> directives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le 22/03/2012 à 22:50, Igor Cicimov a écrit :
"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.

You're certainly right. REQUEST_URI is a standard variable, which can be used in CGIs and the rest, from what the documentation says.

This makes my problem even stranger...

Following your advice, I checked whether I still had a Location statement somewhere, but no, I had removed after our first exchange, when you showed me that solution wasn't useable.

Then I tried to stick with the SetEnvIf method. Though I don't think statements are case-sensitive, I wrote it exactly that way, but still no luck.

Sounds rather simple:

 Header add X-Debug-Request-URI "%{REQUEST_URI}e"

 SetEnvIf REQUEST_URI "/onlinestore/checkout.*" CheckingOut=1
 Header add X-CheckingOut "checking-out" env=CheckingOut


Behaviour:
1) the X-Debug-Request-URI header is correct in the HTTP response, example:

X-Debug-Request-URI: /cartes-en-ligne/checkout/

2) the X-CheckingOut header, however, is NOT set. :-(

All seems to go as if the REQUEST_URI seen by the SetEnvIf statement had already been modified by the RewriteRules. I haven't found any way to save it in another env. variable (let's say SAVED_REQUEST_URI) before it gets used...

This is driving me crazy. Thanks anyway for all your suggestions.

Best 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@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux