title: Allowing video to be played in <video> element from my website, but not allowing it through direct link
body: <p>I used the below tricks:</p>
  
  <p>First, I disabled the right click in order to prevent the user from using <code>save as</code> or <code>get link</code> using this HTML5:</p>
  
  <pre><code>&lt;body oncontextmenu="return false;"&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Second: I used the <code>controlsList="nodownload"</code> but the problem it works fine ONLY in Chrome 58+ as per <a href="https://developers.google.com/web/updates/2017/03/chrome-58-media-updates#controlslist" rel="noreferrer">this</a>, later on I may consider customs control as shown <a href="https://codepen.io/frytyler/pen/juGfk" rel="noreferrer">here</a></p>
  
  <pre><code>&lt;video width="512" height="380" controls controlsList="nodownload"
         poster="https://archive.org/download/WebmVp8Vorbis/webmvp8.gif" &gt;
        &lt;source src="videos/289522.mp4" type="video/mp4"&gt;
        &lt;source src="videos/289522.ogv" type="video/ogg"&gt;
        &lt;source src="videos/289522.webm" type="video/webm"&gt;
        Your browser doesn't support HTML5 video tag.
  &lt;/video&gt;
  </code></pre>
  
  <p>I still need to prevent the user from downloading it in case he got the link by other means, I found some talks about using <code>.htaccess</code>, so I created one inside the <code>videos</code> folder, and tried this:</p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{HTTP_REFERER} !^http://my.domain.com/.*$ [NC]
  RewriteCond %{HTTP_REFERER} !^http://www.my.domain.com/.*$ [NC]
  RewriteRule .(mp4|mp3|avi)$ - [F]`
  </code></pre>
  
  <p>and used as an alternate way, this:</p>
  
  <pre><code>&lt;Files "reminder.php"&gt;
          Order Deny,Allow
          Deny from all
          Allow from http://my.domain.com/
          Allow from http://my.domain.com/
  &lt;/Files&gt;
  </code></pre>
  
  <p>But what happened is video had been blocked completely, even from my website itself, and I started getting this error:</p>
  
  <blockquote>
    <p>GET <a href="http://my.domain.com/videos/289522.mp4" rel="noreferrer">http://my.domain.com/videos/289522.mp4</a> 500 (Internal Server Error)</p>
  </blockquote>