I need to protect files within a directory, I used .htaccess file as below and put it in the directory :
AuthType Basic
AuthName "Authentication Required"
AuthUserFile "c:\passwords\.htpasswd"
Require valid-user
It works fine when I browse the directory example.come/directory, but it doesn't work when I browse example.come/directory/aFile.zip. It doesn't ask for user and password.
How can I protect files in the directory?