I created a password protected directory using .htaccess
and .htpasswd
, but the files don't show up when I go to the directory URL.
I have this in my .htaccess
:
#Protect multiple files
<FilesMatch "^(.*).csv$">
AuthName "Dialog prompt"
AuthType Basic
AuthUserFile /xxxxx/test
#AuthUserFile ".htpasswd"
Require valid-user
</FilesMatch>
UPDATE: I'm protecting the CSV files in that directory. They disappear from the directory listing when that auth directive is set. They show up when I remove it. I want to be able to at least see the files in the directory listing, but when accessing these files it would offer an auth prompt.