=======================================
vCard Lite: How to protect Admin Pages
=======================================
FAQ:
Q: How to set up a password protected directory?
A: Using the .htaccess file!

CONTENT

I.   What is .htacess?
II.  I want use .htacess file, what i need do?
III. Other resources links

--------------------------------------------------------------------
I. WHAT IS .HTACCESS?
--------------------------------------------------------------------
  .Htaccess is a small text file that control configuration aspects of an
  Apache web server (Most Unix web server run Apache server).
  Most people are familiar with the .htaccess file in
  relation with the ability to restrict access to a directory via password
  protection.

Example of a simple .htaccess file
---------------------------------------------
AuthUserFile /path/to/your/password/dir/vCardLite/admin/.htpasswd
AuthGroupFile /dev/null
AuthName "Restricted Area"
AuthType "Basic"

<Limit GET POST>
require valid-user
</Limit>
---------------------------------------------

Exampel of .htpasswd file with login and password info
---------------------------------------------
admin:rngxrrnRhGdFo
otherlogin:3lmIn9MHfWkKc
---------------------------------------------



--------------------------------------------------------------------
II. I WANT USE HTACESS FILE, WHAT I NEED DO?
--------------------------------------------------------------------
         (Adapted Tutorial from Hypermart.net)
How restrict access to certain files within your Web site to selected
users. Follow these simple steps to protect any directory. Then, users will have to log in
and provide a password before they can gain admittance to the files in this directory. 

1.Place all the files that you want to protect in a separate directory. 

2.Create two .txt files. (A text editor such as Notepad is ideal for the task.) 

     a.Cut and paste the following text into the first file: 

       AuthUserFile /home/path/to/your/protected_dir/.htpasswd
       AuthName "Restricted Area"
       AuthType "Basic"
       require valid-user 

       The text must appear exactly as shown, with no extra spaces or other
       errors. You should, however, change the text "restricted are" in line one to
       text you would like to appear in the log-in box that prompts the user. You
       also must change the text "protected_dir" in line three to the name of the
       directory where you've placed the files you want to protect. When you've
       finished editing this file, save it with the name ".htaccess." Notepad will
       automatically save it as a .txt file. 

     b.The second file will contain the user names and passwords of all the users
       you will be granting access to. They will appear in the following format: 

       username1:password1
       username2:password2

       Again, the text must appear exactly as shown with no extra spaces or other
       errors. Simply change "username1" to the authorized user's name and
       "password1" to the authorized user's encrypted password. 

       Note: All passwords must be encrypted. Go to 

	   Calculate Web Password
	   http://tip.net.au/tip/info/calc-passwd.html

	   and enter each login and password into the dialog box, then click on
	   "Compose Password Entry." It's easy. So Copy content like
	   
	   admin:zgyBjO0IMHK7.
	   
	   in ".htpassd" file

       When you've finished editing this file, save it with the name ".htpasswd". 

3.Next, upload these two files, .htaccess. and .htpasswd, into the directory you want
  protect. To preserve the integrity of these files, you must upload them using an
  FTP client in ASCII mode. 

4.Finally, after you've uploaded the files to the directory you want protect, you must
  remove their ".txt" file extensions. Simply rename the files using the appropriate
  tool in your FTP client. Once the file extensions have been removed, only those
  users you've added to .htpasswd will be able to access the files inside. You can
  edit the .htpasswd file at any time to add or delete user names as necessary.

--------------------------------------------------------------------
III. OTHRE RESOURCES LINKS
--------------------------------------------------------------------
- bruce-hamilton.com - .htaccess password protection tutorial
 URL: http://bruce-hamilton.com/tutorials/password.shtml
 
- TechTutorials.com: htacess Tutorial
 URL: http://www.techtutorials.com/tutorials/htaccess.shtml
 
- CGI Extremes - Tutorials - .Htacess and Password Protection
 URL: http://www.cgiextremes.com/extras/Tips_Tutorials/htaccess.htm



  Enjoy!


