Hey,
I want to restrict file downloading from various folders on my server,
i want to configure my server to return a “restricted” error.
I thought of copying a custom .htaccess file to each folder, but then
there will be users that manage to overwrite it.
So i thought about using the “master” .htaccess file located in my FTP account’s root, in the following manner:
<Directory /users/*.exe>
</Directory>
<Directory /users/*.rar>
</Directory>
<Directory /users/*.zip>
</Directory>
<Directory /users/*.tar>
</Directory>
and just restrict other archive formats by checking MIME-type.
And additionally, use a hot-link protection script.
Now, here comes the real issue:
I want to allow any user to download any file, provided he visited my page, and was referred to the file with a header i created.
I thought of moving each file to a temp folder on request, and then erasing it’s contains each 24 hours, but that would be to complicated and resource-consuming.
Thanks to all helpers!!