View Single Post
Old 08-27-2002, 07:17 AM  
priest
Confirmed User
 
Industry Role:
Join Date: Aug 2002
Location: Los Angeles, California
Posts: 139

What about something like this?

Add this rule to your .htaccess file in your movie directory:

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

Or add this one:

RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_REFERER} !^http://yourIPaddress/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com/.*$ [NC]
RewriteCond %{HTTP_COOKIE} !(^|(.+;)*)id=valid(;.*|$)
RewriteRule /*$ http://www.yoursite.com [L,R]

Place the cookie script below between the <head> </head> HTML section of the index.html

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

Last edited by priest; 08-27-2002 at 07:25 AM..
priest is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote