View Single Post
Old 01-09-2005, 08:57 AM  
vapewiz
Confirmed User
 
Join Date: Nov 2002
Location: Michigan
Posts: 1,530
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>
vapewiz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote