# Orbit — Apache front-controller + hardening (cPanel compatible)
<IfModule mod_rewrite.c>
    RewriteEngine On

    # Force HTTPS (uncomment in production behind SSL)
    # RewriteCond %{HTTPS} !=on
    # RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    # Serve existing files/dirs directly (assets), else route to index.php
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^ index.php [L]
</IfModule>

# Do not expose dotfiles / sensitive files
<FilesMatch "^\.">
    Require all denied
</FilesMatch>

# Long cache for static assets
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css "access plus 30 days"
    ExpiresByType application/javascript "access plus 30 days"
    ExpiresByType image/svg+xml "access plus 30 days"
</IfModule>

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json image/svg+xml
</IfModule>

# PHP hardening (php.ini / .user.ini also recommended — see docs/CPANEL.md)
<IfModule mod_php.c>
    php_flag display_errors Off
    php_value upload_max_filesize 8M
    php_value post_max_size 10M
</IfModule>

Options -Indexes
