# 炎酷CMS Apache 伪静态 + 目录保护
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^sitemap\.xml$ index.php?sitemap=xml [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^sitemap\.txt$ index.php?sitemap=txt [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^sitemap\.html$ index.php?sitemap=html [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^robots\.txt$ index.php?robots=1 [L,QSA]
RewriteRule ^message/$ index.php?msg=1 [L,QSA]
RewriteRule ^col-([0-9]+)(-([0-9]+))?\.html$ index.php?col=$1&p=$3 [L,QSA]
RewriteRule ^art-([0-9]+)\.html$ index.php?art=$1 [L,QSA]
RewriteRule ^page-([a-zA-Z0-9_]+)\.html$ index.php?page=$1 [L,QSA]
</IfModule>

# 禁止直接访问敏感目录内文件
RedirectMatch 403 ^/(data|cache|inc|config)/.*$

# 禁止直接访问全部模板文件（内含 PHP 源码；模板仅由程序 include，静态资源在 public/assets）
RedirectMatch 403 ^/template/.*$

# 禁止直接访问备份/SQL/日志/私钥类文件
RedirectMatch 403 \.(sql|log|pem|md)$
