64-bit Windows2003 II6 Helicon isapi_rewrite 3 picture anti-theft chain

Source: Internet
Author: User
Tags rar

Prerequisite:

64-bit WINDOWS2003,IIS6, the request realizes the picture anti-theft chain.

idea:

Because it's not Apache, it's going to cost brains.

System deployment is using iis6+resin3, so the picture parsing is IIS thing, want to use the filter to achieve neither.

It's natural to think of the ISAPI, the search

Find Helicon Isapi_rewrite 3

question:

Isapi_rewrite 3 is a charge.

  

Solve:

Found a lightweight version of the Isapi_rewrite 3 Lite x64,64 bit

Http://www.helicontech.com/download-isapi_rewrite3.htm

There are some limitations on functionality:

Http://www.helicontech.com/isapi_rewrite/doc/litever.htm

The main affected are: No support for distributed. htaccess configurations, directory and Web site level configurations. Only one global httpd.conf configuration file is loaded from Lite version installation folder

Can not be a single site configuration, can only configure a global, fortunately, our site on a master station and a BBS

The biggest benefit is: Isapi_rewrite Lite are completely free

There is isapi_rewrite 3 and Apache compatible, and many documents can be found directly in Apache's Help configuration document

Download installation, open installation directory modify httpd.conf

# Helicon Isapi_rewrite configuration file
# Version 3.1.0.69

Rewriteengine on
Rewritecond%{http_referer}!^$ [NC]
Rewritecond%{http_referer}!google.com [NC]
Rewritecond%{http_referer}!baidu.com [NC]
Rewritecond%{http_referer}!^ (. */.xxx/.com/.*$) [NC]
#RewriteCond%{http_referer}!www.xxx.com [NC]
#RewriteCond%{http_referer}!bbs.xxx.com [NC]
Rewriterule. */. (gif|jpg|bmp|png|rar|zip|flv|swf) $ http://www.xxx.com/block.png [r,nc,l]

Configuration Description:

1, Rewritecond%{http_referer}!^$ [NC]

Allows null "HTTP_REFERER" access, which is the display of picture files that allow users to enter a picture address directly in the browser's address bar. In general, this is optional, however, it is recommended that this setting, if forced to have "http_referer" to access, may cause some problems, such as when a user accesses through a proxy server.

2, Rewritecond%{http_referer}!xxx.com [NC]

Set up HTTP sources to allow access, including our site itself, Google, Baidu, xxx.com and so on.

3, Rewriterule. * *. (gif|jpg|png) $ http://www.xxx.com/block.png [r,nc,l]

Define the image to be replaced when hotlinking, so that all hotlinking jpg, GIF, PNG and other files of the Web page, display the root directory no.png files. Note: Replace the displayed picture not in the directory where the security chain is set, and the smaller the picture file is, the better. Of course, you can not set the replacement picture, but use the following statement:

Rewriterule. */. (gif|jpg|png) $–[f]

4, the description of which R, NC and L

R is the meaning of turning.

NC refers to case insensitive

The function of L is to indicate the end of this shift, and the subsequent steering is unaffected by the previous judgment statement.

5, prevent the hotlinking file type

The example above is GIF, JPG, PNG, and as needed, can change or add other file types, such as RAR, MOV, different file extensions between the use of "|" Segmentation.

In this way, you can basically do simple to prevent the occurrence of hotlinking, and can do the most possible to reduce the server traffic of the fearless consumption,

  

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.