Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: (qmail 66747 invoked from network); 6 Feb 2009 17:10:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Feb 2009 17:10:46 -0000 Received: (qmail 94128 invoked by uid 500); 6 Feb 2009 17:10:45 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 94105 invoked by uid 500); 6 Feb 2009 17:10:45 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 94094 invoked by uid 99); 6 Feb 2009 17:10:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Feb 2009 09:10:45 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mmwaldman@nyc.rr.com designates 71.74.56.124 as permitted sender) Received: from [71.74.56.124] (HELO hrndva-omtalb.mail.rr.com) (71.74.56.124) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Feb 2009 17:10:37 +0000 Received: from DeJaVu ([67.247.0.125]) by hrndva-smta02.mail.rr.com with ESMTP id <20090206171015.DMMJ9192.hrndva-smta02.mail.rr.com@DeJaVu> for ; Fri, 6 Feb 2009 17:10:15 +0000 From: "Michele Waldman" To: Subject: RE: Making mod_auth_digest mysql Date: Fri, 6 Feb 2009 12:10:19 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 Thread-Index: AcmIZpOIpysnTEInSK2le96thCFh9gAFyyjg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 In-Reply-To: <1404e5910902060623r26eae67bwe3c47ed754466df3@mail.gmail.com> Message-Id: <20090206171015.DMMJ9192.hrndva-smta02.mail.rr.com@DeJaVu> X-Virus-Checked: Checked by ClamAV on apache.org The isn't one. I'm talking about writing it. -----Original Message----- From: Eric Covener [mailto:covener@gmail.com] Sent: Friday, February 06, 2009 9:24 AM To: modules-dev@httpd.apache.org Subject: Re: Making mod_auth_digest mysql On Fri, Feb 6, 2009 at 8:49 AM, Michele Waldman wrote: > I mean to check server environment variables which is what REMOTE_USER is. This might be better off on users@httpd.apache.org > I just want to know if the variable is defined on the server then I could do > this: > > RewriteEngine On > RewriteCond %{REMOTE_USER} -e I couldn't find any reference to "-e", to check if it's empty you can do !="" or !^$ > RewriteRule ^(.*)$ - [S=1] > RewriteRule ^.*$ http://domain/login.html [R] > > Right now when REMOTE_USER is not defined this line gets executed: > RewriteRule ^(.*)$ - [S=1] > > I want that line to be skipped if REMOTE_USER has not been defined as a > server environment variable. In per-vhost context, that will never be set unless you use the lookahead feature. > > You can see the values in phpinfo(); It is only defined if the user is > logged in. That processing is later, so REMOTE_USER may be set by then. > Why would a nonexistent variable evaluate to true? Unless i'm confused re: "-e", It seems like your "-e" would be interpreted as a regex, but that shouldn't match an empty string AFAICT. -- Eric Covener covener@gmail.com