I have read about a hundred pages on hotlinking today and I have been trying to implement an .htaccess file to prevent it, but so far nothing is working.
What I want to do is stop people from directly downloading from my DL directory.
i.e.
www.mysite.com/download/myfile.avi
If they type in the above I want an error page displayed.
Currently I have an .htaccess file in the root directory of my site, as follows.
RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER} !^http://www.mysite.ca/.*$ [NC]
RewriteRule .*.(avi|AVI|mpg|MPG|wmv|WMV|swf|SWF)$ - [F]
This is very simplistic, but I just want to get it working, then I can add other options or whatever.
Any help on what I am doing wrong is appreciated.