destoon Using Rewrite Rules to Set Website Security

  • 2021-07-02 23:47:34
  • OfStack

In order to enhance the security of destoon, it is necessary to make necessary security settings. This paper takes Rewrite rule settings to increase website security as an example:

Rule 1:

Shielding non-php extended dynamic files, such as asp, aspx, etc., can prevent backdoor programs with asp, aspx and other suffixes from running


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

Rule 2:

Shield the file directory php operation authority of the site, and the file directory of the site has write authority by default. When an unknown vulnerability occurs in the website, it may be written to the backdoor program. After preventing php from running, even if there is a backdoor program, it will not run.


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

One more version is required for version 3.0 and below


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

Related articles: