M
M
MintCarp22021-04-06 22:00:23
Apache HTTP Server
MintCarp2, 2021-04-06 22:00:23

Setting access by headers in htaccess apache 2.2 windows?

Colleagues, good afternoon!
I'm learning how to protect direct links to Apache. The situation is as follows, there is a page localhost:81/site/page1.html, on which a video is played in the tag at the link localhost:83/video/v2.mp4
I tried to set up the following .htaccess file:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !.*/*\.html$
RewriteRule \.(mp4)$ localhost:81/page1.html [R=301,L]

The idea was this: when opening a direct link, it redirects to page1.html
However, it does not redirect, when a direct link is opened, the video does not really play, but it can be downloaded.
On the network tab, I see the following.
606caf9eaa602973192482.png

Could you tell me how to configure htaccess correctly?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question