|
|
|
|
|
|
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
![]() |
#16 |
You tried your best and you failed miserably. The lesson is 'never try'
|
This is what I use and it works with my wmv files...
.htaccess file RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*yourdomain.com(:80)*/ [NC] RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*anyotherreferingdomain.com(:80)*/ [NC] RewriteCond %{HTTP_COOKIE} !(^|(.+ ![]() RewriteRule /* http://www.picz.ca/notice.html [R,L] ) Then here's the trick to get it working with wmv's or any file for that matter. Put this in the head of the html file that your visitors will see (with the videos on it). <SCRIPT LANGUAGE="javascript"> // Calculate the expiration date var expires = new Date (); expires.setTime(expires.getTime() + 24 * 60 * 60 * 1000); document.cookie = "id=valid; path=/" + "; expires=" + expires.toGMTString(); </SCRIPT> That javascript will make a cookie (which is one of the rewritecond's in the htaccess file). So even though the wmv file doesnt show a referal, the surfer that was at that page will have that cookie and therfore can download the wmv file. Last edited by stev0; 2004-11-08 at 04:59 PM.. |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|