0

FOllowed Allowing video to be played in <video> element from my website, but not allowing it through direct link

But it's not working for me. It only works on my TEST server which is RewriteCond %{HTTP_REFERER} !^https://xx.admin.yy.net/.*$ [NC,OR]

When I move my change to production with the following domains (RewriteCond %{HTTP_REFERER} !^https://www.strategy.domain.com [NC,OR] RewriteCond %{HTTP_REFERER} !^https://strategy.domain.com [NC]) , The video is not playing at all. No error messages.

RewriteEngine On
RewriteCond %{REQUEST_URI} \.(mp4|mp3|avi)$ [NC]
RewriteCond %{HTTP_REFERER} !^https://xx.admin.yy.net/.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} !^https://www\.strategy\.domain\.com [NC,OR]
RewriteCond %{HTTP_REFERER} !^https://strategy\.domain\.com [NC]
RewriteRule ^.* - [F,L]
Nair
  • 1
  • I get 403 from my website too.. video not loading – Nair Jan 07 '20 at 13:15
  • I don’t think your boolean concatenation of the conditions is correct here to begin with. Your first and second condition are joined with an implicit logical AND - so what you have here is true when the first two conditions match together, or when the third or fourth match _on their own_. – 04FS Jan 13 '20 at 12:00
  • _“The video is not playing at all. No error messages.”_ - did you verify that your browser actually does send a referrer in that case to begin with? (Use browser dev tools, network panel, to check.) – 04FS Jan 13 '20 at 12:01

0 Answers0