Gossamer Forum
Home : General : Internet Technologies :

.htaccess - require usr:pass only for certain IPs?

Quote Reply
.htaccess - require usr:pass only for certain IPs?
Hi folks,

got this problem: I want to configure my Apache-.htaccess in a way that it asks for username:password when users come from a certain IP. And it shouldn't ask when the request comes from a certain other IP. How can this be done?
My current .htaccess looks like this:


-----
AuthUserFile /path/to/passwords
AuthName "Members"
AuthType Basic

require valid-user
order deny,allow
deny from all
allow from xxx.xxx.xxx.x
Satisfy any
-----

Thanks
Slugbone
Quote Reply
Re: [Slugbone] .htaccess - require usr:pass only for certain IPs? In reply to
You'd be best just doing what you're doing using allow/deny....I don't know of a way to get the password prompt to show for some IP's and not others.