Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Nov 12, 2015 5:47 am 
Offline
Senior Newbie

Joined: Mon Jan 19, 2015 1:52 pm
Posts: 5
Hope someone can help me out here.

I have two servers, one of them is a linode (I actually have more linodes but that is not relevant here ;))

The linode (server I) contains nothing but mp4 files which are being displayed on our site (server II). The site is being visited by a few million people each month, movies are just a very small part of the content and not very important. I didn't want a sudden popularity of one video cause the site to crash, hence the second server.

We don't allow other people to embed the videos except for some partners, so I use this htaccess

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} \.(mp4)$ [NC]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?mydomain\. [NC]
RewriteRule \.(mp4)$ - [NC,F]
</ifModule>


This works! Except there is one problem. I do not want to allow empty referrals either, I don't want people to download the file. It works by removing:
RewriteCond %{HTTP_REFERER} !^$

Embedding on my domain works in all browsers, embedding on other domains doesn't work anymore, direct requests don't work anymore...so far so good ...BUT the videos are not loading on mobile devices any more....m.mydomain.com BUT if you type m.mydomain in your desktop browser it does work.....confusing :)

Am I missing something here, driving me mad :)

Kind regards


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group