First, Begin By Creating The File Below, and Naming It ".htaccess"
<!-- -- - - BEGIN CUTOUT PORTION -- - - - - - >
AuthUserFile /usr/home/yourname/ht_docs/admin/.htpasswd
AuthGroupFile /dev/null
AuthName My Private Area
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>
<!-- -- - - END CUTOUT PORTION -- - - - - - - >
Okay, begin by editing the first line of the file, the AuthUserFile
portion, change the unix style path to the full unix style path to
the .htpasswd (more below, just make it go into the protecting dir)
on your server, for example /usr/home/yourname/ht_docs/admin/.htpasswd
Now, Change The Third Line, The AuthName To A Name You Would Like Your
Users To Be Prompted With, for example,
Please Enter Authorization for "My Private Area"
Okay, thats it for the first file, now upload this file, in ascii format
with the name .htaccess to the directory you would like protected, which
should be the same as the AuthUserFile Directory!!
Now You Need To Create A File Called ".htpasswd" (Always Without THe
quotes)
This file needs to be in the format:
username:encryptedpassword (username-colon-encrypted password)
you can encrypt a password at this url:
http://www.itisi.com/itisi/cgi-bin/pwgenerator.cgi
now add as many users add you would like with a hard break after their
each set, for example
jo:dkfow.xof/234
mark:kdfj2o3045.dff/A
you get the drift!!
Now upload that file in ascii format named ".htpasswd"
And whala, when you go the the password protected dir:
ie: http://www.yourdomain.com/admin/
you will be prompted for a password, this includes all directories below
the proteected one, ie: www.yourdomain.com/admin/usrs/ will be protected
as well