htaccess help
Home
Sign Up
Banners
Hosted Galleries
htaccess help
Console Scripts
Stats
WM Referral
Terms
Contact

How to protect your images from hotlinkers:

  1. Upload all your images into one folder on your server
    make sure that no html files are in that folder.
  2. Save following text in notepad and save it as .htaccess
    Not as .htaccess.txt please check that before you upload
    it in ASCII mode to the image folder.

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !http://www.yourdomain.com
    RewriteCond %{HTTP_REFERER} !http://yourdomaink.com
    RewriteRule /* http://www.redirecturl.com

  3. Go to http://www.hotlinking.com/ and test the url of your pic,
    if you get redirected to the url you entered here
    RewriteRule /* http://www.redirecturl.com
    you are save from picture hotlinkers.

How to protect Movies from hotlinkers:

  1. Save following cookie script in your head part of the html, where you have the links to the mpegs.

    <script language="javascript">
    // Calculate the expiration date
    var expires = new Date ();
    expires.setTime(expires.getTime() + 1 * 60 * 60 * 1000);
    document.cookie = "id=valid; path=/" + "; expires=" + expires.toGMTString();
    </script>

  2. Upload all movies into one folder on your server
  3. Upload following .htaccess in ASCII mode

    RewriteEngine on
    RewriteOptions inherit
    RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*yourdomain.com/ [NC]
    RewriteCond %{HTTP_COOKIE} !(^|(.+;)*)id=valid(;.*|$)
    RewriteRule /*$ http://www.redirecturl.com/index.html [L,R]

  4. Now your movies are protected from hotlinkers.