Don't use htpasswd if coming from local host
Solution 1:
Insted of mod_rewrite, you need to use the Satisfy directive:
Require valid-user
Allow from 127.0.0.1, 192.168.1.25
Satisfy Any
Insted of mod_rewrite, you need to use the Satisfy directive:
Require valid-user
Allow from 127.0.0.1, 192.168.1.25
Satisfy Any