当前位置: arrow 集锦碎片 arrow 站点安全 arrow htaccess 里设定 "禁止执行权限"

htaccess 里设定 "禁止执行权限"

2008-05-26

直接目录权限755,而只放image但644, 444 却行不通... 如此可以建立 .htaccess 放在不需要执行权限的目录里

# Don't list contents, that would be bad :D
IndexIgnore *
Options All -Indexes
# Secure directory by disabling script execution
 AddHandler cgi-script .php .php2 .php3 .php4 .php5 .php6 .php7 .php8 .pl .py .jsp .asp .htm .html .shtml .sh .cgi
Options -ExecCGI
# Don't show this file, that would be bad as well!
<Files .htaccess>
order allow,deny
deny from all
</Files>