- Code: Select all
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mysite.com/.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} !^https://(www\.)?mysite.com/.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?anothersite.com/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg)$ http://www.mysite.com/images/nopermission.gif [R,L]
RewriteRule \.(mov)$ http://www.mysite.com/no_access.mov [R,L]
It works... but it's kind of backwards. If I try to view a movie from "mysite.com" it still applies the second RewriteRule, as if I was hot linking to my own movies!
Can anyone see anything in my code that could be causing it?
I would definitely appreciate any pointers in the right direction!