How To Password Protect Directory Access Via Apache (HTTP)
I ran into a problem today, my team member asked me to password protect a directory in such a way that when someone access it via Web URL, it should first ask for password. Once user is validated then it should lead him/her to the actual web page.
Guess what is the most easy way to do it, I followed the following method and it worked perfectly. Since Apache is the web server and usually it is handling hundreds of websites on a single server so it is not a wise way to make changes in its configuration file often. We will achieve it via .htaccess.
Now go into the directory in which you wish to apply this restriction and create a .htaccess file (off-course if this does not exist already) and add the following lines with necessary modifications ( The only modification will be that you will need to change the path of the root directory of your applicaton).
AuthType Basic
AuthName “Admin”
AuthUserFile “/var/www/html/MYAPP/passwd”
require valid-user
Now create a file with name passwd at /var/www/html/MYAPP/ path and add the username and password in the following formate:
admin:K1/BaQTbqe0Eo
where admin is the username and the encrypted value after: is the password.
Restart apache service and you will be seeing the login prompt appearing on application launch.
Tags: .htaccess, Apache, featured, Http, Password Protect, Password Protect Directory

WOW thats a very cool feature
Thnx aun bai
Louboutin Shoes are trend setters, beautiful and trendy and Christian Louboutin Pumps can transform a sad getup into a spectacular look. During shopping, women spend the majority of their time in selecting which pair of Christian Louboutin Boots to go for. They attempt to make Christian Louboutin Sandals sure that their pair of boots precisely match their handbag and outfit the way that they want.
Coach Purses are classic, durable and stylish. This time Coach Ergo designers have outdone Coach Legacy with the latest hit to the collection, Coach Madison is a blast from the past with design inspirations reminiscence of the bohemian artist days of the 1960s.
A touch screen will help the user do YES DEAR smoothly and this is why most car YES DEAR DVD player buyers look out for this function while purchasing YES DEAR DVD COLLECTION players.