禁用热链接或我的影片直接下载,只流视频的时候它是从一个网页在我的网站显示(Disable hot linking or direct download of my videos and only stream the video when it's displayed from a page in my website)

   IT问题网   2018-05-06 00:00:00

问 题

我要disbale的热链接 flv 和 mp4 视频托管在我的服务器上,除了当影片在从一个网页,其中它的url的开始的显示:
http://www.mywebsite.com/index.phpmain_page=videos_pageamp;

什么是apache的配置,我要添加到我的.htaccess文件?

解决方案

要禁用热链接和更换一个通用站点标识内容fo各种直接的人到你的网站而不是图像,将其添加到。 htaccess的folde凛您的网站的根目录:

 选项+了followsymlinks
rewriteengine叙述上
的rewritecond%{http_referer}!^ $
的rewritecond%{http_referer} ^ http://(www \)yoursite \ .com / [nc]
的rewritecond%{request_uri}盗链\!(gif | png \某些文件类型不盗链)[nc]
的rewritecond%{request_uri} ^ / index.php的main_page = videos_page&放!?;
重写规则* \。(gif | jpg | png)$ http://www.mywebsite.org/generic/imagetoreplace.png [nc]
 

记住,htaccess的是隐藏的,所以一定要确保"显示隐藏文件"它在夜的ftp客户端开启。

标签:禁用链接或者影片直接下载视频时候它是一个



分享:

  • 微信
  • QQ好友
  • QQ空间
  • 新浪微博


热门推荐

如何重写URL以文章标题塞?(How to rewrite url with post title slug)

problem consider a url www.example.com/paper-ads-details ...

如何检查使用的.htaccess缓存文件是否存在,加载正常的脚本,如果不(How to check if a file exists in cache using .htaccess, load normal script if not)

problem i've been messing around with .htaccess files for ...

如何prevent阿帕奇/ mod_rewrite对治疗路径,文件名称相同(How to prevent Apache / mod_rewrite from treating path as file with same name)

problem i'm using wamp server, mostly configu ...

字preSS和子域htaccess的(Wordpress and subdomains htaccess)

problem i currently have wordpress installed ...

如何删除多个尾随斜线?(How to remove multiple trailing slashes)

problem here are my rewrite rules: ########### # rewrite ...

mod_rewrite的:如何在本地文件夹,子文件夹搜索,然后重定向到index.php(mod_rewrite: How to search in local folder, subfolder and then redirect to index.php)

problem i need to create the following rule to place in m ...

如何使用htaccess的改变图像路径?(How to change image path using htaccess)

problem i'm fixing this joomla site. it uses joomla 1.7 l ...

没有索引文件目录(directories with no index file)

problem i have a site that allows download or ...

如果301重定向没有查询字符串present - 的.htaccess(.htaccess - 301 redirect if no query string present)

problem i would like to create a 301 from a page to the s ...

为什么htaccess的重写规则^富$也匹配^ foobar的$(Why does htaccess RewriteRule ^foo$ also match ^foobar$)

problem i want these url redirects / forwards ...

如何限制访问文件的文件夹在codeigniter(How to restrict access to files in a folder in codeigniter)

problem hello i have used codeigniter to develop my websi ...

如何自定义单词添加到我的域名网址为每个请求?(How to add a custom word to my domain URL for every request)

problem consider my domain name is www.mydomain.com co ...

根和子文件夹htaccess的重写的index.php(htaccess rewrite index.php on root and subfolders)

problem i'm trying to redirect all requests to ./index.ph ...

Django的共享主机安装问题,404管理URL,urls.py被忽略(django on shared hosting setup issue, 404 for the admin url, urls.py being ignored)

problem i have setup django on shared hosting (why shared ...

重定向库文件夹移动到另一个域中的画廊(Redirect gallery folder to a gallery in another domain)

problem i have a wordpress blog with nextgen gallery inst ...

麻烦香草篝火/ CI安装和.htaccess(Trouble with vanilla Bonfire/CI installation and .htaccess)

problem ok, so my situation is rather simple ...

重写PHP友好的URL使用.htaccess文件多种语言(Rewrite Friendly php URL for multiple languages using .htaccess file)

problem i have a couple websites that i built a cms for t ...

如何使用htaccess的缩短网址(how to shorten url using htaccess)

problem hello guys i need to shorten my url u ...

我可以禁用改写为特定的目录?(Can I disable rewrite for specific directory)

problem i have a website that runs with cakephp, and i ha ...

Laravel路由不工作1和1(Laravel routes aren't working with 1&1)

problem many many many topics about this, but ...