httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Horne <J.Ho...@plymouth.ac.uk>
Subject Re: Multiple authentication test?
Date Mon, 10 Jun 2002 09:15:53 GMT
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


Mime
View raw message