I've got a rule during my application (in /.htaccess) that sets a htpassword for accessibility site. We want this around the remote server, because we do not want anybody except us seeing it.

However, around the local server, I'd rather not cope with the htpassword mess. Can there be in whatever way will be able to result in the rule valid only when the domain is not "localhost", or something like that of the similar variety?

I am using PHP like a after sales language, therefore if there is a way I'm able to solve it with PHP, that might be great.

Thank you for any help ahead of time.

Edit - The problem code:

authtype basic
authgroupfile /dev/null
authuserfile /path/to/htpassword
authname "Secure Area"
require user username

http://httpd.apache.org/docs/current/howto/auth.html#satisfy

  AuthType Basic
  AuthName intranet
  AuthUserFile /www/passwd/users
  AuthGroupFile /www/passwd/groups
  Require group customers
  Order allow,deny
  Allow from internal.com
  Satisfy any
RewriteCond %{HTTP_HOST} your_remote_hostname

Include that symptom in (clearly changing the appropriate spend your hostname) prior to the RewriteRule line.