SquidGuard is a URL redirector used to use blacklists with the proxysoftware Squid. There are two big advantages to squidguard: it is fast and it is free.
Stop image bandwidth theft
- Apache
This example services up a different image instead:RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example\.com [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} ^http://.*$
RewriteRule \.(jpe?g|gif|bmp|png)$ /media/nohotlinks.png [L] - Lighttpd
$HTTP["referer"] !~ "^(http://example\.com|http://www\.example\.com)" {
$HTTP["referer"] != "" {
url.access-deny = ( ".jpg", ".jpeg", ".png", ".gif", ".pdf" )
}
}Includes a remote IP option if you have certain IP's you want to be able to get at the images:
$HTTP["referer"] !~ "^(http://example\.com|http://www\.example\.com)" {
$HTTP["remoteip"] !~ "^(127\.0\.0\.1)$" {
url.access-deny = ( ".jpg", ".jpeg", ".png", ".gif", ".pdf" )
}
} - Varnish
Varnish rules to server a result quicker?Resources
Bandwidth Theft | Preventing image hotlinking with .htaccess
Smarter Image Hotlinking Prevention
Using Varnish to capitalize on image hotlinkers and retain referred visitors
- Log in to post comments