htaccess - allow from IP xxx, OR require valid user?

Hello Experts,

Can someone please help with composing an htaccess file?   The logic I need is:

- allow anyone from IP xxx.xxx.xxx, or yyy.yyy.yyy or zzz.zzz.zzz
- if not from any of those IPs, require a valid user

Thanks
LVL 1
xfvgdrthbdtyvhgscvAsked:
Who is Participating?
 
kpmartinCommented:
htaccess:
AuthUserFile /usr/local/apache/bin/htpasswd
AuthName "My Secret Area"
AuthType Basic
Satisfy Any                       // Default is Satisfy ALL
<Limit GET POST>
order deny,allow
deny from all
allow from .some.net
allow from .some.net
require user fred
require user bob
require user tim
</Limit>

You'll need to create the password fie of course or make a group file
your paths may be different; for clarification: http://home.golden.net/htaccess.html
0
 
yuzhCommented:
0
 
xfvgdrthbdtyvhgscvAuthor Commented:
Thank you for the reference.  I'll give it a read.  Right now, though, could I trouble you for just the few lines of code?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.