Is there any way to configure Apache web server to ask for LDAP credentials before download a file with a filename that starts with a fixed string?. I mean, suppose you have a folder with documents inside and you can download them freely from URL like myserver/docs/doc1.pdf.
The case is that inside “docs” folder I need to include some restricted documents that must be only downloaded from authenticated users. I though about renaming private documents and make filename starts with “priv-” string like “priv-doc3.pdf” so I need to configure Apache to ask for credentials only it the filename to download starts with “priv-”. Is it possible?.
Configuring block or adding .htaccess file?.
Thanks in advance.
Diego