![]() |
Movie Posters - Can you do this?
Can you use cookies and htaccess to protect movies if the html page where the cookie is set is on a different domain and server than the one the movies are on? (i.e. I have the gallery on one host and the movie files on a cheap ass host)
The cookies and htaccess work for me when I've got all the files on the same domain, but when I try it with the movie files on the other server I get errors in windows media about the file being corrupt. Is this not possible or am I doing something wrong? |
Here is a movie poster for Lord of the Rings:
http://imagecache2.allposters.com/im...LORDOF2AOS.jpg |
Well that wasn't very funny, but at least you bumped my thread :thumbsup
|
From what I know, a cookie set by domain A can NOT be read by domain B. Not even different subdomains on the same domain. Won't work.
|
Quote:
|
Quote:
|
Quote:
|
When you set a cookie, you tell the cookie which domains to send itself to. Unless you are operating scripts on both servers, there's really no way for you to do what I think you are talking about.
SpaceAce |
Quote:
// 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. |
Quote:
|
Your question is funny in a way. You say you use hotlink protection, and then you think it's weird that you get an error in WMP when you hotlink the movies? :winkwink:
|
I couldve sworn this thread was about "motion picture posters" as well.
|
All times are GMT -7. The time now is 08:47 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123