.htaccess password

Hi can any one confirm if it’s possible to do the following

have a .htaccess user name and password but if the ip it comes from it automatically allows thru?

Yep, you can do something like this:

#Allow website access to only certain IPs. Everyone else is prompted for a username and password.
Order Deny,Allow
Deny from all
Allow from 192.168.
Allow from 172.17.1.2
Allow from 127.0.0.1
AuthUserFile C:\\path\	o\\passwords\\.htpasswd
AuthName "Test Site"
AuthType Basic
satisfy any
require user testuser
#end website allow

If you need to use a wildcard, just leave off the octets where you want the wildcard to be.