Detailed introduction to IIS anti-leech settings in Windows

Source: Internet
Author: User

In Windows, the IIS anti-leech setting requires an ISAPI_Rewrite component. Then we load ISAPI_Rewrite to iis, and then we can perform httpd in iis. I 've written the anti-leech function in ini. Next I will introduce it to you.

On the homepage, We have installed a component: isapi. msi.

After the installation is complete, read and write permissions on the IIS_WGP group in the software installation directory (important. If you do not set the permission, your website will directly serve Unavailable and cannot be accessed ).

If your installation directory is D: Program FilesHeliconISAPI_Rewrite (the default installation directory is Program FilesHeliconISAPI_Rewrite), right-click ISAPI_Rewrite, choose "properties"> "security"> "add"> "advanced"> "Search now". An IIS_WGP item is found. Double-click "add" and click "OK. Select the group and click "Full Control" to grant the read and write permissions to the group.

 

Now, install the software (iis will be restarted during installation), select the permission directory set in the previous step, and open Internet Information Service in the Control Panel after installation, in the "open website properties" dialog box, there is an "isapi filter". Click "add" and enter a name that is easy to understand, click "Browse" for "executable files", select ISAPI_Rewrite.dll, () in the installation directory of ISAPI_Rewrite, and click "OK. Restart iis.

 

Modify httpd in the installation directory. INI file (if this file is "read-only", remove "read-only" and modify it), as mentioned above, configure the Windows virtual host httpd. the same as the INI file.

The IIS server anti-leech protection method is to add the following statement to httpd. ini:

The Code is as follows: Copy code

RewriteCond Host: (. +)

RewriteCond Referer :(?! Http: // 1 .*).*

RewriteRule .*.(? : Gif | jpg | png | exe | rar | zip)/block.gif [I, O]

Then restart IIS. Then anti-leech protection starts to take effect. All requests sent from other websites are rejected.

If you want to protect individual sites from anti-leeching or your forum is separated by two domain names. The above method will cause mutual anti-leech protection! If the call fails, change the method as follows. The Code is as follows:

The Code is as follows: Copy code

RewriteCond Host: (. +)

RewriteCond Referer :(?! Http ://(? : Www.zhanhelp.com | www.Discuz.net). +

RewriteRule .*.(? : Gif | jpg | png | exe | rar | zip)/block.gif [I, O]

In addition

Http://www.bKjia. c0m and www. bKjia. c0m sites

All leeching attempts on other websites are rejected!

Now, the anti-leech configuration has been adjusted. After that, a block.gif file is created in the root directory of the website. This image is displayed on the website where the leeching website is located. Finally, you can get rid of the troubles of leeching.

With www. bKjia. c0m is used as an example. Please make the appropriate changes based on the actual situation. The baidu.com and google.com are in order not to prevent seo/seo.html "target =" _ blank "> search engine spider from capturing images, separate the sites with "|". A station must have two parts: [baidu.com | (. *) .baidu.com. The last line of code is the anti-leech extension. Add and modify it by yourself./nopic.gif shows this image when someone else steals the link and stores it in the root directory of the website. Now your website has the image anti-leech feature.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.