Hi everyone, I am using .htaccess and .htpasswd to password protect a file within a directory. According to my need, i need to password protect 3 different pdf files with individual username and password inside the same directory. Is this possible in apache? I know we can protect an entire directory using <Directory> or a single file using .htaccess file. Any suggestion on this issue would be greatly appreciated. Thank you Lochan
Yes Joebert, I used a single .htpasswd file containing <username:encryptedPassword> list like: .htpasswd user1:HASHA user2:HASHB user3:HASHC and a .htaccess file containing AuthUserFile /home/lochan/.htpasswd AuthType Basic AuthName "My Secret Page" <Files "First File"> require user user1 require user user2 </Files> <Files "Second File"> require user user2 require user user3 </Files> ....... ....... That solved my problem.