PDA

View Full Version : Problems with hot-linking prevention


Jenn
08-06-2005, 12:20 PM
Okay, so I've used the .htacess code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?egraphics.pickle-green.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?pickle-green.com/egraphics/.*$ [NC]
RewriteRule \.(js|gif|jpg|png)$ http://www.boomspeed.com/egraphics/bad.gif [R,L]

And I'm testing it out by hot-linking to several of my images on different sites. I've tried it on Geocities, LiveJournal, and Xanga, but so far the only site that shows the error image instead of the orignal image is Geocities. The original image still shows on the other two sites. Anyone know what I did wrong?

My host is Lunarpages and it says I have Apache version 1.3.33 (Unix).

Could it be the browser I'm using? (I use Firefox)

_Aerospace_Eng_
08-08-2005, 06:29 AM
Try something like this
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite\.com [NC]
RewriteRule .*\.(gif¦jpeg¦png|bmp)$ - [NC,F,L]
Someone else posted this, I'm just reposting it to help you.