View Single Post
Old 12-17-2002, 09:12 PM  
Snake Doctor
I'm Lenny2 Bitch
 
Snake Doctor's Avatar
 
Join Date: Mar 2001
Location: On top of my soapbox
Posts: 13,449
Quote:
Originally posted by missnglnk


They can if you properly set the cookie domain value. If set to '.domain.com', it will allow all subdomains, if set to 'domain.com', it will only allow that domain, and if set to 'blah.domain.com', it will only allow that subdomain.
This is the javascript I'm using to set the cookie (without the opening and closing javascript tags)

// Calculate the expiration date
var expires = new Date ();
expires.setTime(expires.getTime() + 24 * 60 * 60 * 1000);

document.cookie = "id=valid; path=/" + "; expires=" + expires.toGMTString();


and this is what's in the htaccess file

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


It works when I put the movies in a subfolder of the directory the html page is in, but it fucks up when I have the movies on another server.
__________________
sig too big
Snake Doctor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote