有这个IP'192.241.234.14'。该社区有大约1200个网站,这些网站是我的热门图片。
我不想阻止除了我们之外的所有网站,因为我确实依赖谷歌图片搜索......以及其他网站。
我试过这个
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?192\.241\.234\.14 [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?myabccoolpix\.com/ [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://i.imgur.com/xxxxxxx.jpg [L]
Order Deny,Allow
Deny from 192.241.234.14
但我能成功阻止它的唯一方法是阻止每个域。 还有更好的方法吗?
答案 0 :(得分:0)
我不想这样做。 阻止每个人的热链接
# allow blank referrer requests
RewriteCond %{HTTP_REFERER} !^$
# allow all requests from your domain
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?domain1\. [NC]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?domain2\. [NC]
RewriteCond %{HTTP_REFERER} !^https?://11\.22\.333\.44(.*)$ [NC]
# search engine access
# include or remove search engines feed readers and other sites
RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
RewriteCond %{HTTP_REFERER} !google\. [NC]
RewriteCond %{HTTP_REFERER} !yahoo\. [NC]
RewriteCond %{HTTP_REFERER} !bing\. [NC]
RewriteCond %{HTTP_REFERER} !duckduckgo\. [NC]
RewriteCond %{HTTP_REFERER} !dogpile\. [NC]
RewriteCond %{HTTP_USER_AGENT} !msnbot [NC]
RewriteCond %{HTTP_USER_AGENT} !bing [NC]
RewriteCond %{HTTP_USER_AGENT} !google [NC]
RewriteCond %{HTTP_USER_AGENT} !ask [NC]
RewriteCond %{HTTP_USER_AGENT} !yahoo [NC]
RewriteCond %{HTTP_USER_AGENT} !slurp [NC]
RewriteCond %{HTTP_USER_AGENT} !facebookexternalhit [NC]
RewriteCond %{HTTP_USER_AGENT} !yoast [NC]
RewriteCond %{HTTP_REFERER} !yoast [NC]
RewriteCond %{HTTP_REFERER} !bing [NC]
RewriteCond %{HTTP_REFERER} !live [NC]
RewriteCond %{HTTP_REFERER} !google [NC]
RewriteCond %{HTTP_REFERER} !gstatic [NC]
RewriteCond %{HTTP_REFERER} !yahoo [NC]
RewriteCond %{HTTP_REFERER} !pinterest [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://i.imgur.com/xxxxx.jpg [L]