|
|
|
|
|
|
![]() |
#12 |
You tried your best and you failed miserably. The lesson is 'never try'
|
Use an htaccess file like this
RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*yourdomain.com(:80)*/ [NC] RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*allowedreferer.com(:80)*/ [NC] RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*anotherallowedreferer.com(:80)*/ [NC] RewriteCond %{HTTP_COOKIE} !(^|(.+ ![]() RewriteRule /* http://www.sendhotlinkershere.com[R,L] ) change the URLs obviously... then, on the content page serving the videos, add this javascript between the HEAD tags. <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 create a cookie (which is one of the access conditions in that htaccess). So the videos will work after the user views the content page, and be hotlink protected. |
![]() |
![]() |
|
|