Use Dedecms to set up a resource class download site, the server's bandwidth will often be illegal hotlinking information on the Internet, make their own web site access and download are very slow, seriously affect the normal users of the site download and experience, to continue to seek and improve the download mechanism, become very important, We can use a small piece of code to easily achieve dedecms software download anti-theft chain function.
OK, let's show you how to do that.
1, landing your http://www.aliyun.com/zixun/aggregation/8984.html "> website Management background--> system--> system settings--> software channel settings
Change the link display to: Require access to the Download address List page, as shown in the download screenshot:
Upload and overwrite download.php files, test the anti-theft chain successfully.
The use of this code is to determine the user's http_referer information, if not from the content page, then automatically jump to the download content page, such as:
In addition, if the students have the conditions, you can also use the Httpaccesskeymodule module to achieve a higher level of anti-theft chain effect, if you want a more in-depth understanding of the Httpaccesskeymodule module, the details can be read in the Nginx anti-theft chain Module Httpaccesskeymodule Configuration and use of the guide.
Attached download.php part of the Code for reference:
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.