Stop Bandwidth Theives – Lighttpd Style

by damonp on October 10, 2005

Previous hotlinking post provided a solution for Apache servers only. Here is one for Lighttpd.

# deny access for all image stealers
$HTTP["referer"] !~ "^($|http://.*\.(domain1\.com|domain2\.com)" {
     url.access-deny = ( ".jpg", ".jpeg", ".png", ".wmv", ".avi", ".mpeg", ".mpg", ".gif" )
}

Replace domain1.com and domain2.com with domains to be allowed as referrers. Modify the list of extension to deny access to.

Popularity: 6% [?]

{ 2 comments… read them below or add one }

Raman February 12, 2008 at 11:53 am

i get this warning:
WARNING: unknown config-key: url.access-deny (ignored)

what could be the reason?

Reply

Joachim September 14, 2009 at 4:58 pm

Raman: make sure your server.modules includes mod_access

Reply

Leave a Comment

Previous post:

Next post: