The isn't one.  I'm talking about writing it.

-----Original Message-----
From: Eric Covener [mailto:cove...@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 <mmwald...@nyc.rr.com>
wrote:
> I mean to check server environment variables which is what REMOTE_USER is.

This might be better off on us...@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
cove...@gmail.com

Reply via email to