允许脚本访问,阻止浏览器访问
我正在使用 flowplayer 在我的网站上播放 flv 视频,我不希望用户知道视频的实际路径,这样他们就无法下载它们。但是当鼠标悬停在视频上时,视频路径在状态栏中可见(在 FireFox 中),例如: http ://www.example.com/videos/123.flv
因此,如果用户转到目录(视频),他就可以查看视频并下载它们。所以我在那里放了一个空的index.html文件,现在视频列表不显示。 :)
但是,如果用户在 url 中输入完整路径,则可以下载视频。 (显示下载对话框)。这是我的担心。所以我在 .htaccess 文件中添加了以下几行。
<文件〜“.flv$”> 命令拒绝、允许 不允许任何人 所有人都否认
现在的问题是,flowplayer无法播放视频。
那么我如何限制对浏览器上视频的访问,并只允许访问 flowplayer 呢?
iam playing flv videos in my site, using flowplayer, and i dont want the users to know the actual path of the video, so that they cant download them. But onmouseover on the video, the video path is visible in the statusbar (in FireFox), for ex: http://www.example.com/videos/123.flv
So if the user goes to the directory (videos), he can view the videos and can download them. So i put an empty index.html file there, now the video list is not displayed. :)
But still, if the user enters the complete path in the url, the video can be downloaded. (shows the download dialog box). This is my worry. So i added the following lines in my .htaccess file.
<files ~ ".flv$">
order deny,allow
allow from none
deny from all
</files>
Now the problem is that, the flowplayer is not able to play the video.
So how can i restrict access to the video on the browser, and allow access only to flowplayer?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简短的回答是你不能。数据必须先到达用户的计算机才能播放。
您可以尝试修改播放器,以便它发送额外的 HTTP 标头,并在没有它们的
The short answer is that you can't. The data has to arrive on the user's computer before it can be played.
You could try to modify the player so that it sends additional HTTP headers, and deny access without them, but: