Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 50082 invoked by uid 500); 10 Jun 2002 09:15:41 -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: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 50071 invoked from network); 10 Jun 2002 09:15:41 -0000 Received: from tracy.csd.plymouth.ac.uk (141.163.66.132) by daedalus.apache.org with SMTP; 10 Jun 2002 09:15:41 -0000 Received: from jhorne.csd.plymouth.ac.uk ([141.163.60.243.4203]) by tracy.csd.plymouth.ac.uk with esmtp (Exim 3.36 #1) id 17HLHF-00079u-02 for users@httpd.apache.org; Mon, 10 Jun 2002 10:15:53 +0100 Received: from john by jhorne.csd.plymouth.ac.uk with local (Exim 4.04) id 17HLHF-0002eO-00 for users@httpd.apache.org; Mon, 10 Jun 2002 10:15:53 +0100 Message-ID: X-Mailer: XFMail 1.5.0 on Linux X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit MIME-Version: 1.0 In-Reply-To: Date: Mon, 10 Jun 2002 10:15:53 +0100 (BST) Reply-To: j.horne@plymouth.ac.uk Organization: University of Plymouth From: John Horne To: users@httpd.apache.org Subject: Re: Multiple authentication test? X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On 07-Jun-2002 at 14:20:15 Joshua Slive wrote: > On Fri, 7 Jun 2002, John Horne wrote: >> and this all works fine. However I would like to combine the second test >> with the fact that the user must be from a specific IP address as well >> (but that address is different from the 66.136 and 60 subnet >> addresses). Can I do something like: >> >> Allow from 141.163.66.136 141.163.60. >> AuthType Basic >> AuthName "Big Brother" >> AuthUserFile /home/bb/bb-access >> require valid-user >> Allow from 141.163.88.100 >> > No. But you can get that effect using mod_rewrite in combination with > your first configuration. > Here's an example to get you started: > > RewriteEngine On > RewriteCond %{REMOTE_ADDR} !^141\.163\.88\.100$ > RewiteCond %{LA-U:REMOTE_USER} .+ > RewriteRule .* - [F] > Yup, this works fine :-) Many thanks. Of course, I had to RTFM to understand what on earth the rewrite conditions and rule were doing! :-) Regards, John. ------------------------------------------------------------------------ John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914 E-mail: jhorne@plymouth.ac.uk PGP key available from public key servers --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org