The most intolerable part of our hard-to-do websites is the collection, leeching, and leeching of website resources, which will seriously slow down the speed of our website and, if it is space, the monthly traffic is limited, which consumes a large amount of traffic, which is a serious problem.
The following rules can be used to configure anti-Leech protection for counterattack.
RewriteCond % {HTTP_REFERER }! ^ Http: // (www .)? Your_domain.com (/)? (.*)? $ [NC]
RewriteCond % {HTTP_REFERER }! ^ Http://m.your _ domain.com (/)? (.*)? $ [NC]
RewriteRule. * \. (jpg | png) $ http://www.111cn.net/images/fangdaolian.png [R, NC]
(Www .)? Indicates that no www., followed (/)? Similarly, it means that without/, you can think of www. your_domain.com, www. your_domain.com/, your_domain.com, www. your_domain.com/, and the last (.*)? Wildcard all links under the entire domain name.
RewriteRule. * \. (jpg | png) $ indicates that it is not the website specified in RewriteCond. When accessing all jpg or png files, it will jump
Http://www.111cn.net/images/fangdaolian.png address, thus the success of anti-Leech.
However, it should be noted that the images with the anti-Leech prompt cannot use the images in the RewriteCond domain name, otherwise they will be in an endless loop.