Forum Moderators: phranque
The alt page it redirects to has a flash player file embedded in it which itself loads the individual flv's.
For some reason the code works correctly 90% of the time, however every once in a while it will actually load the flv directly.
Can anyone see anything glaringly wrong in the following code?
Options +MultiViews +FollowSymLinks
# DENY
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} \.flv$ [NC]
RewriteCond %{HTTP_REFERER} !sub.example.com [NC]
RewriteRule (.*) http://sub.example.com/folder/index.php [R=301]
Thanks very much in advance for any help/assistance or pointers
If you need more media content security, then use a script to serve all media, and have that script check a cookie that will be set only if the client has previously requested an "authorized" referrer page on your own site.
ALternately, you could use a "diversionary tactic" -- Rename your media subdirectory every day (or every hour, etc.) and then update the links on all of your pages by changing a PHP variable that tracks the correct directory name.
Jim
Am I correct in thinking that with the below method – as long as the user has previously visited the "authorised referer page" that they will still be able to directly access the .flv file as long as the attempt occurs within that authorised php session?
If you need more media content security, then use a script to serve all media, and have that script check a cookie that will be set only if the client has previously requested an "authorized" referrer page on your own site.
So, although it sounds rude/harsh/simplistic and is not the answer that we want to hear, it's really true: "If you don't want it copied, don't publish it on the Web." All we can do is to *limit* the ease with which content can be ripped; Because of human nature, making it ten percent harder eliminates 90% of the content theft.
On the other hand, I wasn't necessarily referring to a session cookie, but rather to a specific content-control cookie outside of PHP's session framework. You *could* create a cookie with a very short persistence, so that the media content could only be loaded within a few seconds of the cookie-setting page being loaded. The caveat is to make this persistence-time long enough for your legitimate users with the slowest dial-up connections.
Jim
Taking on board what you've discussed I think I need to re-consider the scope of what I'm trying to achieve. What you said about making it 10% harder struck me and I think that will be sufficient for my needs.
Thanks again!
Bub