# ===== ป้องกันไฟล์ระบบ (Apache / LiteSpeed ของ Namecheap) =====
Options -Indexes
<FilesMatch "^(config\.php|config\.sample\.php|schema\.sql|\.user\.ini|.*\.md|.*\.txt)$">
  Require all denied
</FilesMatch>
# บังคับใช้ https
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTPS} !=on
  RewriteCond %{HTTP:X-Forwarded-Proto} !https
  RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
<IfModule mod_headers.c>
  Header always set X-Content-Type-Options "nosniff"
  Header always set Referrer-Policy "same-origin"
  <FilesMatch "\.(html)$">
    Header set Cache-Control "no-cache"
  </FilesMatch>
</IfModule>
