What is an empty Referer in anti-leech settings? Referer in anti-leech settings

Source: Internet
Author: User

What is an empty Referer in anti-leech settings? Referer in anti-leech settings

What is the difference between setting anti-leech protection and not specifying a blank Referer?

What is a Referer?

Here, the Referer refers to a field in the HTTP header, also known as the HTTP source address (HTTP Referer), used to indicate the link from where to the current webpage. The format is URL. In other words, the HTTP Referer header web page can be used to check where visitors come from, which is often used to deal with forged cross-site requests.

The correct English spelling of Referer is referrer. Due to spelling errors in earlier HTTP specifications, errors will occur to maintain backward compatibility. The specification of other network technologies attempts to correct this issue and use correct spelling, so the current spelling is not uniform.

For example, if you click the URL next to the data source Wikipedia, the browser will generate an HTTP request sent to the Web server of Wikipedia, the request will contain a Referer field (that is, the address of this page): http://kb.qiniu.com/52pw6cde

Source: http://zh.wikipedia.org/wiki/httpreference address

What is an empty Referer? When will blank Referer appear?

First, we define a blank Referer as that the content in the Referer header is null, or an HTTP request does not contain a Referer header.

When will the HTTP request not contain the Referer field? According to the Referer definition, the function of a Referer is to indicate where a request is linked. When a request is not triggered by a link, naturally, you do not need to specify the link source of the request.

For example, if you directly enter a resource URL in the address bar of a browser, such a request will not contain the Referer field, because it is an HTTP request generated out of thin air, it is not linked from a place.

In anti-leech settings, what is the difference between allowing empty Referer and not allowing empty Referer?

In anti-leech whitelist settings, if the White List contains an empty Referer, you can directly access the resource URL in the address bar of a browser;

However, if a blank Referer is not required, direct access via a browser is also forbidden.


To solve this problem, the referer can display a link from the http page. What can be the reason why the referer is empty?

Two possible reasons:
1. The written program automatically accesses the page without referer information;
2. Access the url directly written in the browser without referer information

Anti-leech settings

For example, if someone else uploads something, you directly take the LINK and paste it to another forum or website, declaring that "there are good things, please download them ", or tell your friend, "do you want this file? I have a connection, let's get down, and then accept the endless admiration from others (of course, the result is that you don't want to mix it up here)
What is leeching

The definition of "leeching" is that this content is not on its own server, and through technical means, it bypasses the final page of the beneficial interests of others in advertising, this content is provided directly to end users on their own pages with AD benefits. It is often because some small websites with unknown names steal the addresses of some powerful websites (such as music, pictures, and software) and place them on their own websites, this method steals the space and traffic of a large website.

Why is leeching

An important phenomenon in browsing is that not all a complete page is sent to the client at a time. If the request is a page with many images and other information, the first Http request is sent back the text of the page, then explain the text in the browser of the client and find that there are images in the text. Then, the browser of the client will send an Http request, after the request is processed, the image file will be sent to the client, and then the browser places the image back to the correct position on the page, A complete page may be displayed only after multiple Http requests are sent. Based on this mechanism, a problem occurs, that is, leeching: If a website does not contain the information in the page, it can connect the image to other websites. In this way, websites without any resources use other website resources to present the resources to the viewers, which increases their access traffic, and most viewers will not easily find it. Obviously, it is unfair for the website that has been used resources. Some poor websites often steal links from other websites to expand their website content without increasing the cost. On the one hand, it damages the legitimate interests of the original website, and on the other hand it increases the burden on the server.

Leeching I met

My website has two types of leeching at most: Image leeching and file leeching. Once there was a website with a huge access volume that leeched my website's images, it actually consumed several GB of traffic a day. At the same time, many large software with dozens of megabytes on our site are also often hijacked by files, consuming a lot of resources on our site.

Leeching Solution

In fact, this headache problem can be easily solved through the URL filtering technology of the WEB server.

If the WEB server uses APACHE, using the Url Rewrite feature provided by APACHE can easily prevent various leeching. The principle is to check the REFER, if the REFER information comes from other websites, access to the required resources is prohibited.

Does IIS support UrlRewrite?

The answer is simple, not supported. However, we can enable IIS support by installing third-party server extensions.

Currently, there is a product that supports IIS UrlRewrite. Its name is ISAPI_Rewrite.

At: www.helicontech.com/download/

Here, only one LITE version of ISAPI Rewrite is free, and others are trial versions. The version of ISAPI Rewrite Lite does not support virtual site configuration, metadata monitoring, and automatic cache cleaning. However, basic UrlRewrite functions are supported.

How do I set UrlRewrite?

Isapi_rewrite uses a regular expression to replace the expression of the rule.

The following is a simple example. I want our users to enter the full text...>

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.