This solution didnt wok for me in windows 2000, apache server when my .htacess was:
AuthType Basic
AuthName "By Invitation Only"
AuthUserFile /WWW/.htpasswd
Require username
However, it worked when I did the following:
AuthType Basic
AuthName "By Invitation Only"
AuthUserFile c:/WWW/.htpasswd
<Limit GET>
require valid-user
</Limit>
[As Savage has suggested, In he "httpd.conf" the setting: "AllowOverride None"
to be changed to : "AllowOverride All"
to make this work]
thanks to all