# 禁止访问敏感文件
<FilesMatch "\.(json|log|md)$">
    Order Allow,Deny
    Deny from all
</FilesMatch>

# 禁止访问includes目录
<FilesMatch "includes/">
    Order Allow,Deny
    Deny from all
</FilesMatch>

# 禁止访问security_check.php直接
<Files "security_check.php">
    Order Allow,Deny
    Deny from all
</Files>

# 禁止访问客户端安全文件
<FilesMatch "_sec_.*\.php$">
    Order Allow,Deny
    Deny from all
</FilesMatch>

# 禁止目录列表
Options -Indexes

# 防止PHP文件被下载
<FilesMatch "\.php$">
    <IfModule mod_php5.c>
        php_flag engine on
    </IfModule>
    <IfModule mod_php7.c>
        php_flag engine on
    </IfModule>
</FilesMatch>

# 设置默认字符集
AddDefaultCharset UTF-8

# 防止文件执行
<FilesMatch "\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)$">
    Order Allow,Deny
    Deny from all
</FilesMatch>