View Single Post
Old 02-14-2005, 03:26 PM  
nico-t
emperor of my world
 
Join Date: Aug 2004
Location: nethalands
Posts: 29,903
holy shit i think its working now...
what i did:


I put this htaccess file in the root directory:
Code:
ErrorDocument 404 http://www.mydomain.com/404.html
ErrorDocument 403 http://www.mydomain.com/404.html

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^.*msn\. [NC]
RewriteCond %{HTTP_REFERER} !^.*yahoo\. [NC]
RewriteCond %{HTTP_REFERER} !^.*altavista\. [NC]
RewriteCond %{HTTP_REFERER} !^.*google\. [NC]
RewriteCond %{HTTP_REFERER} !^.*webcrawler\. [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ des/test/hotlinkimg-d.gif [L]
And i put this htaccess file in the folder where sites can hotlink from, except for 'fusker' etc:
Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^.*fusker*.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^.*usefulidiot*.*$ [NC]
RewriteRule \.(jpe?g|gif|bmp|png)$ test/hotlinkimg-d.gif [L]
thanks swedguy for explaining
nico-t is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote