It's really annoying when you post downloads and other websites just steal the direct link and post it on their own websites right ? With htaccess, you can redirect those direct links to your main website (if someone tries to download a file off your website from an other website, he will be redirected to your website). ;)
Create an htaccess file and paste this inside :
# Protect bandwidth
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?your-website.com/.*$ [NC]
RewriteRule ^download/([^/]+)$ http://your-website.com [R=302,L]
</ifModule>
# Protect bandwidth
This code will only work if your download links use this pattern : http://your-website.com/download/ID
Just edit "download" to adapt it to your website and don't forget to change the URL.
If you get a 500 Internal server error, it means something is wrong in your htaccess, check the syntax, or restart.
