# ============================================ # Security & Routing Configuration # ============================================ # Disable directory listing Options -Indexes # Protect sensitive files Order allow,deny Deny from all # Protect config files Order allow,deny Deny from all # Block access to app directory RedirectMatch 403 ^/app/.*$ RedirectMatch 403 ^/vendor/.*$ RedirectMatch 403 ^/storage/.*$ RedirectMatch 403 ^/install/.*$ # Enable mod_rewrite RewriteEngine On RewriteRule ^$ public/ [L] RewriteRule (.*) public/$1 [L] # Set default charset AddDefaultCharset UTF-8 # Prevent MIME type sniffing Header set X-Content-Type-Options "nosniff" Header set X-Frame-Options "DENY" Header set X-XSS-Protection "1; mode=block" Header set Referrer-Policy "strict-origin-when-cross-origin"