View Single Post
Old 02-02-2005, 12:42 PM  
The Sultan Of Smut
Confirmed User
 
The Sultan Of Smut's Avatar
 
Join Date: Dec 2004
Location: Vancouver
Posts: 4,325
Quote:
Originally Posted by psyko514
Something like this would work:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://www.yourdomain.com/hotlink.jpg [R,NC]

Basically, if any domain other than yours attempts to display an image, it'll be replaced with hotlink.jpg (which can be a ******* pic, for example).
I would add a line for the ip address of your server, it's not essential but I do it anyway:

RewriteCond %{HTTP_REFERER} !^http://32.332.332.32.*$ [NC]
The Sultan Of Smut is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote