Order deny,allow
Deny from all
AuthName "who the fuck you are?"
AuthUserFile /path/to/.htpasswd
AuthType Basic
Require valid-user
Allow from 192.168.0.0/24
Satisfy Any
For example, if you wanted to let people on your network have unrestricted access to a portion of your website, but require that people outside of your network provide a password, you could use a configuration similar to the following:
Require valid-user
Order allow,deny
Allow from 192.168.1
Satisfy Any