2003 Httpd.ini control hotlinking for virtual host

Source: Internet
Author: User
Tags ini domain domain name root directory
The recent website picture is hotlinking, causes the server to be overloaded therefore the Internet looked for the anti-theft chain The method most is uses. htaccess anti-theft chain, but I use the virtual host is Windows 2003 not supported. Htaccess, looking for a whole day, finally solved, is to use Httpd.ini to control

First create a new text document change the name to Httpd.ini add the following code to this file

[Isapi_rewrite]
Cacheclockrate 3600
Repeatlimit 32
#已配置了伪静态的可以删除上面三行代码
#防盗链设置
Rewritecond Host: (. +)
Rewritecond Referer: (?!) http://(?: Here fill in your domain name \.cn (. *) \. Fill in your domain name \.cnbaidu\.com (. *) \.baidu\.comgoogle\.com (. *). \google.com). *
Rewriterule. *\. (?: Jpgjpeggifpngbmprarzipexe)/fangdao.gif [I,o,n]


Explain:

Rewritecond Referer: Here, fill in your website that allows you to connect your pictures, where each domain name is separated by ""

(?: Jpgjpeggifpngbmprarzipexe): These are the extensions you need for the security chain file, where each extension is separated by ""

Fangdao.gif: Others hotlinking your picture will show this picture

Set it up and start uploading.

Upload Httpd.ini to the site root directory

Fangdao.gif is also placed in the root directory



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.