本文介绍了的.htaccess阻止特定网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否有可能某个网站的站点范围内的块,例如 - 块flickr.com其中包括IMGSRC的和CSS?作为阻止用户被盗链到Flickr
如果这样,我将如何配置这在一个htaccess
感谢您,
解决方案
RewriteEngine叙述上
的RewriteCond%{HTTP_REFERER} ^ HTTP://(。+ \)mysite的\ .COM / [NC]
的RewriteCond%{HTTP_REFERER}!^ $
重写规则* \。(JPE G |?GIF | BMP | PNG)$ http://i.imgur.com/qX4w7.gif [L]
I am wondering if it possible to a site-wide block of a certain website, for example - block flickr.com which would include 'img' src's and css? As in blocking users from hotlinking to Flickr
If so how would I configure this in an htaccess
Thank you,
解决方案
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://i.imgur.com/qX4w7.gif [L]
这篇关于的.htaccess阻止特定网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!