Protecting folder with Htaccess

How can I protect my folders and file using htaccess file?

Questions by akrmasl

Showing Answers 1 - 7 of 7 Answers

This requires two files


1.  .htaccess
2.  .htpasswd

place these two files in your folder, which you want to protect.

contents in .httaccess
---------------------------------------------------
AuthType Basic
AuthName "protected folder"
AuthUserFile /your/protected/folder/path/.htpasswd
require valid-user

contents in .htpasswd
---------------------------------------------------
username1:encryptedpassword1
username2:encryptedpassword2

Hope it helps you.

Cheers,
KK

sahil

  • Aug 8th, 2011
 

you can use htacess with this code
IndexIgnore *

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions