[users@httpd] [SOLVED (well, kinda)] Re: [users@httpd] Problem when mixing RewriteRules and directives

2012-03-28 Thread Bruno Tréguier
Hi everybody, Following my previous posts regarding my RewriteRule/Location/SetEnvIf problem, a friend of mine suggested a neat solution, quite easy to apply. The trick is to create, on the same machine, another vhost meant to serve exclusively as a reverse proxy, and which will add the inten

Re: [users@httpd] Problem when mixing RewriteRules and directives

2012-03-23 Thread Bruno Tréguier
Le 23/03/2012 07:09, Bruno Tréguier a écrit : Le 23/03/2012 à 1:37, Igor Cicimov a écrit : This is very interesting problem and I thought the issue was the typo leaving your var empty. I'll have to do some research about the mod_rewrite myself to confirm it precedes SetEnvIf in the order of exec

Re: [users@httpd] Problem when mixing RewriteRules and directives

2012-03-22 Thread Bruno Tréguier
Le 23/03/2012 à 1:37, Igor Cicimov a écrit : This is very interesting problem and I thought the issue was the typo leaving your var empty. I'll have to do some research about the mod_rewrite myself to confirm it precedes SetEnvIf in the order of execution. Now I'm really curious about the soluti

Re: [users@httpd] Problem when mixing RewriteRules and directives

2012-03-22 Thread Igor Cicimov
This is very interesting problem and I thought the issue was the typo leaving your var empty. I'll have to do some research about the mod_rewrite myself to confirm it precedes SetEnvIf in the order of execution. Now I'm really curious about the solution my self and will try to find some explanatio

Re: [users@httpd] Problem when mixing RewriteRules and directives

2012-03-22 Thread Bruno Tréguier
Le 23/03/2012 à 0:23, Bruno Tréguier a écrit : 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. :-( Sorry, that was another test. The right output is of course: X-Debu

Re: [users@httpd] Problem when mixing RewriteRules and directives

2012-03-22 Thread Bruno Tréguier
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

Re: [users@httpd] Problem when mixing RewriteRules and directives

2012-03-22 Thread Igor Cicimov
Hold on, it should be SetEnvIf and not SetenvIf in your stanza! On Mar 23, 2012 8:50 AM, "Igor Cicimov" wrote: > "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

Re: [users@httpd] Problem when mixing RewriteRules and directives

2012-03-22 Thread Igor Cicimov
"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_UR

Re: [users@httpd] Problem when mixing RewriteRules and directives

2012-03-22 Thread Igor Cicimov
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" wrote: > Le 22/03/2012 11:11, Igor Cicim

Re: [users@httpd] Problem when mixing RewriteRules and directives

2012-03-22 Thread Bruno Tréguier
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 Rewrit

Re: [users@httpd] Problem when mixing RewriteRules and directives

2012-03-22 Thread Igor Cicimov
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

Re: [users@httpd] Problem when mixing RewriteRules and directives

2012-03-21 Thread Bruno Tréguier
Le 21/03/2012 à 12:57, Igor Cicimov a écrit : Lets see ... why is mod_rewrite called mod rewrite? Probably because it rewrites something and that something is the url. Well, as strange as it might seem to you, I had figured that out myself, you see. ;-) So you need to catch what ever you n

Re: [users@httpd] Problem when mixing RewriteRules and directives

2012-03-21 Thread Igor Cicimov
Lets see ... why is mod_rewrite called mod rewrite? Probably because it rewrites something and that something is the url. So you need to catch what ever you need before it gets rewritten by mod_rewrite. And in your case the Location comes too late ... On Mar 21, 2012 8:55 PM, "Bruno Tréguier" wro

Re: [users@httpd] Problem when mixing RewriteRules and directives

2012-03-21 Thread Bruno Tréguier
Le 21/03/2012 10:15, Igor Cicimov a écrit : U if you read your post you will find that you have answered your own question. The /onlinestore/checkout matches your rewrite rule thus gets redirected to index.php before the Location statement gets into action. I think you need to read the apache

Re: [users@httpd] Problem when mixing RewriteRules and directives

2012-03-21 Thread Igor Cicimov
U if you read your post you will find that you have answered your own question. The /onlinestore/checkout matches your rewrite rule thus gets redirected to index.php before the Location statement gets into action. I think you need to read the apache documentation about the order in which the ru

[users@httpd] Problem when mixing RewriteRules and directives

2012-03-21 Thread Bruno Tréguier
Hello there, I presently have a problem when trying to mix RewriteRules and directives. I searched the list archives but didn't find anything similar to my situation. Let's try to be synthetic. Here are the relevant config directives: At "VirtualHost" level, among other things, here are the