0

i have a folder and i try to protect it and ALL his content with a password by using a .htaccess file

i know how to protect a file

<Files page.php>
AuthName "Message" 
AuthUserFile \www\.htpasswd 
AuthType Basic
require valid-user
</Files>

it works perfecly to protect a file

but it doesn't work for a folder !

AuthName "Message" 
AuthUserFile "\www\.htpasswd"
AuthType Basic
require valid-user

i can try all that i want, the folder is protected but not the subfolders and his subfiles .

for example /order/3213132/file.txt

/order/ is protected but if i write the complete url in my browser i can read the content of file.txt

how to protect a folder and ALL his content with a password without take off the .txt extension ?

Aominé
  • 472
  • 3
  • 11

0 Answers0