How to anti-theft chain? How pseudo static? (Win2003+iis+isapi

Source: Internet
Author: User
Tags filter iis implement ini net rar thread zip
iis| anti-theft chain | pseudo static

If you want to have a server of your own,

Then download:http://www.helicontech.com/download.asp

Then install, whatever you want to do.

Then, open Internet Information Services, right-click, Web site Properties, point ISAPI Filter tab. Add a filter, name the Rewrite, specify the path yourself Isapi_rewrite.dll (under the root of the installation), and then determine.

To set up an extension:

Right-click My Computer--management--services and Applications--internet Information Services (IIS) Management--web Service Extensions--Add a new Web service extension--Enter extension: isapi_rewrite--Add--Browse--Find your installation directory select ISAPI _rewrite.dll open and set to allow this extension to run

At last..

Start adding rewrite rules. Regular, find Isapi_rewrite directory, remove Httpd.ini read-only attribute, open edit.

When opened, the contents are:

[Isapi_rewrite]

# defend your computer from some worm attacks

Rewriterule. * (?: global.asa|default\.ida|root\.exe|\.\.). * . [F,i,o]

We add the following under [Isapi_rewrite] and save it:

[Isapi_rewrite]

# 3600 = 1 hour

Cacheclockrate 3600

Repeatlimit 32

# Protect Httpd.ini and Httpd.parse.errors files

# from accessing through HTTP

Rewriterule ^ (. *)/archiver/([a-z0-9\-]+\.html) $ $1/archiver/index\.php\?$2

Rewriterule ^ (. *)/forum-([0-9]+)-([0-9]+) \.html$ $1/forumdisplay\.php\?fid=$2&page=$3

Rewriterule ^ (. *)/thread-([0-9]+)-([0-9]+)-([0-9]+) \.html$$1/viewthread\.php\?tid=$2&extra=page\%3d$4& Page=$3

Rewriterule ^ (. *)/profile-(USERNAME|UID)-(. +) \.html$ $1/viewpro\.php\?$2=$3

My success settings are as follows:

[Copy to clipboard] [ - ]

CODE:

[Isapi_rewrite]

# 3600 = 1 hour

Cacheclockrate 3600

Repeatlimit 32

# Protect Httpd.ini and Httpd.parse.errors files

# from accessing through HTTP

Rewriterule ^ (. *)/archiver/([a-z0-9\-]+\.html) $ $1/archiver/index\.php\?$2

Rewriterule ^ (. *)/forum-([0-9]+)-([0-9]+) \.html$ $1/forumdisplay\.php\?fid=$2&page=$3

Rewriterule ^ (. *)/thread-([0-9]+)-([0-9]+)-([0-9]+) \.html$$1/viewthread\.php\?tid=$2&extra=page\%3d$4& Page=$3

Rewriterule ^ (. *)/profile-(USERNAME|UID)-(. +) \.html$ $1/viewpro\.php\?$2=$3

# defend your computer from some worm attacks

Rewriterule. * (?: global.asa|default\.ida|root\.exe|\.\.). * . [F,i,o]

And then submit even if it is all done, back to the forum to see if your forum has a static page, have a bar, happy, I am also happy after the completion.

Using Isapi_rewrite anti-theft chain

The use of Isapi_rewrite can be similar to Apache pseudo static path, using its check refer function we can also implement anti-theft chain. The software can be downloaded in http://www.helicontech.com/download/, is a shareware, but there is a lite version is free, basically can achieve the function we need. Installation of the steps I do not say in detail, specifically said Httpd.ini settings.

First, you must ensure that the Httpd.ini has writable permissions and that the Isapi_rewrite installation folder Everyone has modifiable permissions to remove the read-only property of the file.

Httpd.ini default settings are as follows:

Rewritecond Host: (. +)

Rewritecond Referer: (?!) http://\1.*). *

We'll add a sentence behind it.

Rewriterule. *\. (?: gif|jpg|png|exe|rar|zip)/block.gif [I,o]

Can realize Gif/jpg/png/exe/rar/zip file anti-theft chain, hotlinking page shows is/block.gif. Block.gif is a small picture file, we can play on the top of their own website copyright logo and anti-theft chain statement.

If you follow the above settings, then all sites except this site can not use the picture here, if you want to allow a number of exceptions to the site such as Google,baidu and other non-profit site references to do? We can use the following regular expressions to implement

Rewritecond Referer: (?!) http://(?: www\.0e2\.net|www\.google\.com|www\.baidu\.com)). +

If you want to allow all Google and Baidu sub-station such as Images.baidu.com,images.google.com station to do the following settings:

Rewritecond Referer: (?!) http://(?:* \.0e2\.net|*\.google\.com|*\.baidu\.com)). +

At this point, a fairly effective anti-theft chain system has come out, but if the setting has a problem, if the browser browsing the Hotlinking page after the visit to the Site page, the hotlinking image of the cache will affect the normal display of pictures. Put

Rewriterule. *\. (?: gif|jpg|png|exe|rar|zip)/block.gif [I,o]

To

Rewriterule. *\. (?: gif|jpg|png|exe|rar|zip)/block.gif [I,o,n]

Side can. Parameter n means to request the file again from the site instead of the local cache read.



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.