Destoon uses Rewrite rules to set website security _ PHP

Source: Internet
Author: User
This article mainly introduces destoon's use of Rewrite rules to set website security. For more information, see Rewrite.

To enhance the security of destoon, you need to perform necessary security settings. This article uses Rewrite rule settings to increase website security as an example:

Rule 1:

Blocking non-php extended dynamic files, such as asp and aspx, can prevent backdoor programs with extensions such as asp and aspx from running.

RewriteRule ^ (. *) \. (asp | aspx | asa | asax | dll | jsp | cgi | fcgi | pl) (. *) $/404.php

Rule 2:

The php running permission of the website file directory is blocked. the file directory of the site has the write permission by default. when an unknown vulnerability occurs on the website, it may be written into a backdoor program to prevent php from running, even a backdoor program cannot run.

RewriteRule ^ (. *)/file/(. *) \. php (. *) $/404.php

3.0 and earlier versions need to be added

RewriteRule ^ (. *)/cache/(. *) \. php (. *) $/404.php

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.