I need to restrict access to all files stored in /sites/default/files/pdf/ on my Apache webserver. I have tried following FilesMatch expression, but that does not work.
<FilesMatch "sites/default/files/pdf">
AuthName "myauth"
AuthBasicProvider ldap
AuthType Basic
AuthLDAPURL ....
AuthLDAPBindDN ....
AuthLDAPBindPassword ...
Require valid-user
</FilesMatch>
Even matching for specific filename does not work (<FilesMatch "sites/default/files/pdf/myfile\.pdf">). Am I missing something?