Your on the right track. Do this to your .htaccess
Code:
ErrorDocument 401 /rejectionpage.html
AuthUserFile /whatever/.htpasswd //the name of this file is not important
AuthGroupFile /dev/null
AuthName "Access"
AuthType Basic
require valid-user
Now the important thing is to make sure that the .htpasswd file in not located on the web-server, where someone can download it.
The .htpasswd file should look something like this:
Code:
user1:encryptedpass
user2:encryptedpass
user3:encryptedpass
If you have access to the apache web server, you can create the encrytions using its utility.
usage:
htpasswd [-cmdps] passwordfile username
the only required switch is -c , to create the file.
example:
htpasswd -c /whatever/.htpasswd user1 pass1
that will create the file.
Hope this helps