Simple Hotlink Protection

Stop people using your bandwidth and images!

  1. Liam W
    I just added this to my site, might be useful to others :)

    Add this to the htaccess file at the site root, or the directory you keep your protected images:

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !<site url> [OR]
    RewriteCond %{HTTP_REFERER} !<other url> [NC]
    RewriteRule ^.*(png|jpg|jpeg|bmp|svg|psd) hotlinking.jpg
    Then add an image called 'hotlinking.jpg' in the same folder as the htaccess file, and away you go :)

    Here is an example of my own forum:

    View attachment 27368

    Yet the image is in the header of all the site's pages. Some people may find this useful, some may frown upon hotlink protection.


    Autopilot and Brandon like this.