View Single Post
Old 2006-11-22, 07:53 AM   #5
jayeff
Just because I don't care doesn't mean I don't understand!
 
jayeff's Avatar
 
Join Date: Sep 2006
Posts: 95
Send a message via ICQ to jayeff
Quote:
Originally Posted by JD View Post
And htaccess doesnt protect movies does it? Does anyone bother trying to protect hotlinking of your movies?
Movies (actually anything using java(script)) will not send header information, therefore you cannot trap calls by their source. This isn't very secure, but it is better than nothing:
Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*your-domain.com/ [NC]
RewriteCond %{HTTP_COOKIE} !(^|(.+;)*)id=valid(;.*|$)
RewriteRule /* http://%{HTTP_HOST}/ [R,L]
However, for it to work, on a page someone will visit before loading a movie, you must set the cookie by putting this in the <head> section:
Code:
<SCRIPT LANGUAGE="javascript">
document.cookie = "id=valid; path=/"
</SCRIPT>
jayeff is offline   Reply With Quote