View Single Post
Old 05-23-2005, 08:33 AM  
Lycanthrope
Confirmed User
 
Lycanthrope's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: Wisconsin
Posts: 4,517
Quote:
Originally Posted by squeezeboobs
How do I block flusker from using my images and ALSO redirect them if they want to click thru to a free site of mine?
Quote:
Originally Posted by Skripter
RewriteEngine on
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://(www.)?urltoyoursite.com [NC]
RewriteRule .*[Jj][Pp][Gg]$|.*[Gg][Ii][Ff]$ http://urltoyoursite.com/hotlink.html

If I remember my .htaccess properly, this will take all hotlinked images and redirect them to hotlink.html. You can change as needed.
This will not block null refferers and will still allow people to copy and paste, which most of the leech forums instruct their surfers to do.

If you remove the null refferer condition, RewriteCond %{HTTP_REFERER}!^$,
only requests from your site will be shown the images... and people trying to access images directly via copy and paste will be redirected to hotlink.html.

and hotlink.html should be a small file because you'll get a ton of requests after blocking out null referrers, so a simple 0 second metarefresh to your real desired location would be best. People trying to hotlink images from other sites will still get the red x, but copy and pasters will go to your hell / site of choice.
__________________
Lycanthrope is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote