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.