dave seah: better living through new media Filter Navigation Temporary Redirect Page Personal Articles Productivity Articles Compact Calendar The Printable CEO Series The Printable CEO Series Back to Home Page Admin:Login

Thwarting Image Linking

POSTED 10/12/2004 UNDER TricksGweeping

A friend of mine has a problem with his images getting linked by bulletin board groupies looking for cool avatar images. Rather than provide their own bandwidth, they deep-link into his site and use his bandwidth. Punks!

He now has his web server restrict images from being served unless they're referred to from a local page, but I never knew how to set it up. I just happened to come across the how-to here. The .htaccess changes look like:

    SetEnvIfNoCase Referer "^http://my.host.com/" local_ref=1
    <FilesMatch ".(gif|jpg)">
        Order Allow,Deny
        Allow from env=local_ref
    </FilesMatch>

Haven't tried it myself yet, but made a note.

Thank you for printing this article! Please note that all material on this website is copyrighted by either David Seah or individual comment contributors. To request permission for republication and distribution, please contact David Seah (http://davidseah.com/contact).