View Single Post
Old 08-11-2002, 09:39 PM  
Shoplifter
Richest man in Babylon
 
Shoplifter's Avatar
 
Industry Role:
Join Date: Jan 2002
Location: Posts: 10,002
Posts: 5,739
.htaccess to replace hotlinked pics?

So I have an .htaccess to block hotlinkers, but what if I want to replace the pic they are hotlinking with a gif that says "fuck you" etc.

Currently I use:

### Prevent "hot linking" of image files from other sites
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://yourdomain.xxx/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.xxx/. *$ [NC]
RewriteCond %{HTTP_REFERER} !^http://xxx.xxx.xxx.xxx/.*$ [NC]
RewriteRule .*\.(gif|GIF|jpg|JPG)$ - [F,L]
Shoplifter is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote