All you need to do is add a .htaccess file with the following content in your uploads dir:
1 2 3 4 |
<FilesMatch “.(xlsx|xls|docx|doc|rtf|odf|pdf)$”> Order Allow,Deny Deny from All </FilesMatch> |
If you want to limit just any file from being accessed from anyone, just use “./*” instead of the regular expression.