Apache require authentication according to client's ip
I've got an apache web server receiving connections from the internet and from the lan.
I've been limiting access (basic authentication) to certain folders using .htaccess files. Now I've to ask the users comming from the internet to authenticate theirselves and let local users pass through without authentication. Can somebody tell me how can I set it using directives on .htaccess files? Something like deciding if I require a connection to give a user : password pair based on it's ip address. I know I could achieve this using two different virtual host directives. But, is there any other way? Thanks. |
I have a similar setup. Select hosts are permitted access without login / pass, while all others need to authenticate. My .htaccess file reads as:
Code:
order Allow,Deny |
Thanks.
The Satisfy Any directive did the trick. |
All times are GMT -5. The time now is 04:29 AM. |