PDA

View Full Version : Hotlink Protection Stopped Working!


Riboflavin
09-03-2009, 12:14 AM
Hello all, recently I noticed that my hotlink protection seems to have stopped working and some sites I do not want to are linking to my images. Here is my htaccess file, any help would be greatly appreciated.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.mysite\.com$ [NC]
RewriteRule ^(.*)$ http://mysite.com/$1 [L,R=301]

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mysite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mysite.cd/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(staff\.)?mysite.cd/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(ssl\.)?mysite.cd/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mysite.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mysite.eu/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mysite.fm/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mysite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mysite.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mysite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mysite.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mysite.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(ssl\.)?mysite.org/.*$ [NC]
RewriteRule \.(gif|jpg|png|bmp|css)$ - [NC,F,L]

AddHandler php5-script .php

Riboflavin
09-04-2009, 11:55 PM
I noticed it works if I move it to the top of my Htaccess file..