Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 8853 invoked from network); 25 May 2009 09:30:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 May 2009 09:30:00 -0000 Received: (qmail 66020 invoked by uid 500); 25 May 2009 09:29:35 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 66004 invoked by uid 500); 25 May 2009 09:29:35 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 65993 invoked by uid 99); 25 May 2009 09:29:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 May 2009 09:29:35 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 May 2009 09:29:25 +0000 Received: from localhost (localhost [127.0.0.1]) by tor.combios.es (Postfix) with ESMTP id 2B720226070 for ; Mon, 25 May 2009 11:26:16 +0200 (CEST) Received: from tor.combios.es ([127.0.0.1]) by localhost (tor.combios.es [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BgIl1QetdD3D for ; Mon, 25 May 2009 11:26:16 +0200 (CEST) Received: from [192.168.245.129] (montserrat.wissensbank.com [212.85.37.175]) by tor.combios.es (Postfix) with ESMTPA id E64CA22606E for ; Mon, 25 May 2009 11:26:15 +0200 (CEST) Message-ID: <4A1A64CE.1010806@ice-sa.com> Date: Mon, 25 May 2009 11:28:46 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: aw@ice-sa.com User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: users@httpd.apache.org References: <4F255E0B3B0248408590EB78B2D3C98601B42C9D@zrc2hxm2.corp.nortel.com> In-Reply-To: <4F255E0B3B0248408590EB78B2D3C98601B42C9D@zrc2hxm2.corp.nortel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Order of Proxy matching Evan Champion wrote: > Hi, > > Can anyone advise of the order in which statements matching the > same URL are matched? > > I am using SetEnvIf to set a variable that is saved later in the > access_log. Sometimes there is a more specific match and a less > specific match for the same URL, e.g.: > > > SetEnvIf Server_Addr . VAR=first > Allow from all > > > > SetEnvIf Server_Addr . VAR=second > Allow from all > > > My observation is that the matches are done in reverse order of > appearance in the configuration, i.e. in this example, a request to > http://server.example.com/ will match the http://*.example.com/* rule > and the variable will be set to "second". Is it generally correct that > matches are in reverse order of appearance in the configuration? > I don't know the details of how sections work, but there is an alternate possible explanation to what you are seeing : *both* sections above are run, in the order in which they appear, because both of them match. So the first SetEnvIf is executed (VAR=first), but the second one overwrites it (VAR=second). I believe in this case you may want to use some RewriteCond/RewriteRule (mod_rewrite) to do what you want. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org