PDA

View Full Version : .htaccess hotlinking problem =/


mehlindah
11-05-2006, 11:44 PM
Hey, I'm very new to using .htaccess. I know it's dumb and there's probably a small mistake I made, but I can't really deter hot linkers when I paste this in my .htaccess file:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?http://rinato.eorlingas.org/ *$ [NC]
RewriteRule \.(gif|jpg|png)$ http://i102.photobucket.com/albums/m114/allthesechildishthings/hotlink.png [R,L]

I tested t out by hotlinking to an image from my other website, but it didn't work :(. Instead, when I went to my cute news, it had the hotlinking image instead of the usual cute news layout images!:confused:
Can you please help me? I'm a newbie to this forum as well as a newbie to .htaccess.

vinyl-junkie
11-06-2006, 03:11 AM
This should work for you:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?rinato.eorlingas.org(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://i102.photobucket.com/albums/m114/allthesechildishthings/hotlink.png [R,NC]


You might want to visit this page (http://www.htmlbasix.com/disablehotlinking.shtml) for an anti-hotlinking code generator.