Quote:
|
Originally Posted by kenny
I wish .htaccess would work for movies.
|
It can use this in htaccess
Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*domain.com.*$ [NC]
RewriteCond %{HTTP_COOKIE} !(^|(.+;)*)id=valid(;.*|$)
RewriteRule ^.*\.wmv.*$ http://domain.com/hotlink.htm [R,L]
and put this javascript on the page with the movies
Code:
<script language='javascript' type='text/javascript'>
<!--
//hotlink protection
var expires = new Date ();
expires.setTime(expires.getTime() + 24 * 60 * 60 * 1000);
document.cookie = "id=valid; path=/" + "; expires=" + expires.toGMTString();
//hotlink protection
-->
</script>