# ARX Conference 2026 - Production .htaccess Example
# Rename to .htaccess ONLY after testing on cPanel.

Options -Indexes

<IfModule mod_rewrite.c>
RewriteEngine On

# Force HTTPS - enable only after SSL is active.
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

# Protect sensitive file extensions
<FilesMatch "\.(sql|log|ini|env|bak|backup|md|txt)$">
    Require all denied
</FilesMatch>

# Protect hidden files
<FilesMatch "^\.">
    Require all denied
</FilesMatch>

# Basic security headers
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
Header always set X-Frame-Options "SAMEORIGIN"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()"
</IfModule>

# PHP upload limits - may be ignored depending on cPanel PHP handler
<IfModule mod_php.c>
php_value upload_max_filesize 10M
php_value post_max_size 12M
php_value max_execution_time 120
</IfModule>