Skip to main content

WEB安全设置

可以通过以下配置禁止指定的目录执行PHP脚本


Nginx

location ~ ^/(uploads|assets)/.*\.(php|php5|jsp)$ {
    deny all;
} 


apache

RewriteEngine on RewriteCond % !^$
RewriteRule uploads/(.*).(php)$ – [F]