I want to block users from directly accessing pdf files in my uploads folder and only allow validated users to view the file through validate.php validate php and the pdf files are in the same folder this is my htacess file
Options -Indexes -MultiViews
RewriteEngine On
RewriteBase /
#RewriteCond %{REQUEST_URI} !^/uploads/pdf/
RewriteRule ^(.+\.pdf)$ validate.php?filename=$1 [NC]
RewriteCond %{REQUEST_URI} !^/uploads/pdf/
RewriteRule ^(.+\.pdf)$ /uploads/$1 [L]
Please help as i am trying from days