I have a folder in the root of my webshare that holds semi confidential pdf documents. I want anyone accessing that folder or its files to get a permissions error. Thats easy to setup and I have it working with
<FilesMatch "\.pdf$">
Order Allow,Deny
Deny from all
</FilesMatch>
However I want a subfolder on the server that contains PHP scripts to be able to link to these PDF files. Note; I don't want php to be able to read the files internally within the server, but for http requests directly linking these restricted files to suddenly be possible.
I read that htaccess files in child folders can overrule rules higher up a folder path set in a root folder htaccess file. To that end I have setup an htaccess file in the specific subfolder with the php scripts (using allow from all) but it doesnt seem to work.