Anti-hotlinking in effect
Since I got slashdotted a little bit, I’ve turned on anti-hotlinking in the images folder with this htaccess rule:
# Hotlinking
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !elliottback\.com [NC]
RewriteCond %{HTTP_REFERER} !ericback\.com [NC]
RewriteCond %{HTTP_REFERER} !google\. [NC]
RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
RewriteRule .*\.(jpe?g|gif|png)$ - [F,NC,L]
Let me know if I’m missing something, or you see any problems!
| This entry was posted on Monday, July 11th, 2005 at 8:07 pm and is tagged with hotlinking, rewriterule, google, jpe, missing something, http referer, png, little bit, rewritecond, images. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback. |
3 Responses to “Anti-hotlinking in effect”
Leave a Reply


Where do you put this? because if you put it in your .htaccess wont wordpress overwrte it?
This goes in your .htaccess file above the #WORDPRESS section. I assume wordpress is smart enough not to trounce preexisting rules and match only on that section when it updates, but I haven’t checked it out yet.
This is very cool for APache…. if only iis had htacess — MS says wait for IIS 7, sheesh…
What about for IIS webservers? this one is so-so http://www.michaelbrumm.com/leechblocker.html –and this one seems to a good commericial one — http://www.linkdeny.com. Anyone ever tried these out?
Thanks,
Matt