Hotlink Protection Stopped Working!

Discussion in 'Apache' started by Riboflavin, Sep 3, 2009.

  1. #1
    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
    Code (markup):
     
    Riboflavin, Sep 3, 2009 IP