# 1. Prevent Directory Browsing
Options -Indexes

# 2. Block sensitive files access
<FilesMatch "^(db\.php|\.env|\.git|\.htaccess)">
    Order allow,deny
    Deny from all
</FilesMatch>

# 3. Security Headers
<IfModule mod_headers.c>
    Header set X-XSS-Protection "1; mode=block"
    Header set X-Content-Type-Options "nosniff"
    Header set X-Frame-Options "SAMEORIGIN"
    Header set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>

# 4. Block upload folder execution (No PHP inside uploads)
<Directory "/uploads">
    php_flag engine off
    AddType text/plain .php .php3 .phtml .phps
</Directory>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php84” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php84 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
