View Single Post
Old 2005-03-29, 06:45 AM   #7
swedguy
Vagabond
 
swedguy's Avatar
 
Join Date: Aug 2003
Posts: 2,374
Send a message via ICQ to swedguy
Quote:
Originally Posted by Trax
can someone post the code again to do this?
Quote:
Originally Posted by cd34
RewriteEngine on
# leave this line in allow empty referrers, remove to disallow empty referrers
RewriteCond %{HTTP_REFERER} !^$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.*@)?([a-z0-9-]+\.)*yourdomain\.com(:[0-9]+)?(/.*)?$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.*@)?1\.2\.3\.4(:[0-9]+)?(/.*)?$
RewriteRule .*\.(asf|mpg|mpeg|wmv|avi|rm|gif|jpeg|jpg|zip)$ - [NC,F,L]
Replace the last line with:

RewriteRule .*\.(asf|mpg|mpeg|wmv|avi|rm|gif|jpeg|jpg|zip)$ http://www.domain.com/hotlink/image.jpg [NC,R,L]

Make a .htaccess in the "hotlink" folder that has this in it:

RewriteEngine Off

It will allow you to hotlink images in that dir.
swedguy is offline   Reply With Quote