The code is as follows |
Copy Code |
Rewritecond Host: (. +) Rewritecond Referer: (?!) http://1.*). * Rewriterule. *. (?: gif|jpg|jpeg|png|bmp)/block.gif [I,o,n] |
Exclusion of the chain of anti-theft writing, we let Baidu,google and other search engines can show My Pictures
The code is as follows |
Copy Code |
Rewritecond Host: (. +) Rewritecond Referer: (?!) http://1.*). * Rewritecond Referer: (?!) http://(. *) (. baidu.com|. Google.com|. google.cn|. g.cn|. Gougou.com|. Soso.com|. Sogou.com|. Youdao.com|. Bing.com|. Yahoo.com|. yahoo.cn|. eojoo.com)). * Rewriterule. *. (?: gif|jpg|jpeg|png|bmp)/block.gif [I,o,n] |
Another way of writing
The code is as follows |
Copy Code |
Rewritecond Host: ^ (. +) $ Rewritecond Referer: ^ (?!) http://\1.*). *$ Rewritecond Referer: ^ (?!) Http://.*.baidu.com|. *.google.com|. *googlebot.com|. *.abc.net). *). *$ Rewriterule ^ (?!) (/logo.gif|/2_files/logo_tg.gif)). *. (?: gif|jpg|jpeg|png) $/block.gif [I,o,n]
|
A. The www.abc.net in the third line of the above rules for your site's domain name, please make corresponding changes according to the actual situation, inside the baidu.com and google.com is to not prevent search engine spiders crawl pictures.
B. Line fourth in the/logo.gif and 2_fies/logo_tg.gif for your logo image address, the purpose is to allow others to use your logo, if you do not need to be able to remove "(?!) (/logo.gif|/2_files/logo_tg.gif)) ". Later gif jpg and so on can be modified according to the actual situation.
Remember to restart IIS, when the anti-theft chain began to work, other sites hotlinking over the request will be rejected, otherwise it is not possible OH
Tips: Some of these visits can be downloaded by software that downloads your site's resources, which require some server widgets to be implemented, which can be found on the internet and have plenty of free.