ISAPI rewrite implement IIS picture anti-theft chain

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

In order to realize the picture anti-theft chain, according to the data collected on the network plus their own practice, finally realized the image of IIS under the Anti-Theft chain function.

Implementation steps:

1. Download a free version of the ISAPI rewrite software provided by the more famous www.helicontech.com (although there are some functional limitations on the free version, the chain is sufficient):

Http://www.isapirewrite.com/download/isapi_rwl_x86_0072.msi

2. Set the Software installation directory of the IIS_WGP group read and Write permissions (important, if not set up after the installation of your site will be directly service unavailable, inaccessible).

To set the method:

If your installation directory is D:\Program files\helicon\isapi_rewrite (the default installation directory is \program Files\helicon\isapi_rewrite, we can build it first), right click Isapi_ Rewrite, select-> "Security"-> "Add"-> "advanced"-> "Find Now", find a IIS_WGP, double-click Add, OK. Then select the Group and click "Full Control" to have read and write access.

3. Install the software (the software restarts IIS during the installation), install directory Select the directory that has the right permissions in the previous step, open the Internet Information Service in the Control Panel after the installation, and open the Properties dialog box of the Web site with an "ISAPI filter", click "Add", "Filter Name" Casually fill out a good understanding of the name can be, "executable" Item click "Browse", select just installed the Isapi_rewrite installation directory of Isapi_rewrite.dll, OK. Restart IIS.

4. Modify the Httpd.ini file in the installation directory (if this file is read only), remove "Read Only" and then modify it.

Add to:

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]

EXPLANATION Note:

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.

Modifying the rule without restarting IIS requires only modifying the Httpd.ini configuration file.

Related Article

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.