View Single Post
Old 04-03-2005, 01:24 PM  
Zester
Confirmed User
 
Zester's Avatar
 
Industry Role:
Join Date: Jul 2003
Posts: 5,344
anti image hotlinking in .htaccess

I usally use the following to prevent image hotlinking from my entire site:

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

how to modify the above if I want to allow image hotlinking for a certain folder, lets say:
mydomain.com/hotimages/
__________________
* Mainstream ? $65 per sale
* new male contraception
Zester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote