I have a directory structure: httpdocs/documents/folder1 httpdocs/documents/folder2 httpdocs/documents/folder3
etc in httpdocs/document I have a .ht access file:
RewriteEngine on
RewriteRule ^(.*).(PDF)$ fileopen.php
and in this folder I have fileopen.php
This file then opens pdf files in folder1 to folder3 depending on a $_Get request sent by a file request in the httpdocs folder.
I want the htaccess file to limit access to all folders but allow any pdf being requested by fileopen.php to be downloaded and opened. Is this possible cause I can't get it to work.