|
|
How to
protect your images from hotlinkers:
- Upload
all your images into one folder on your server
make sure that no html files are in that folder.
- 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
- 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:
- 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>
- Upload
all movies into one folder on your server
- 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]
- Now your
movies are protected from hotlinkers.
|