<IfModule mod_rewrite.c>
    RewriteEngine On
    
    # Jika di-subfolder, sesuaikan RewriteBase
    # RewriteBase /
    
    # Redirect semua request ke folder public
    RewriteCond %{REQUEST_URI} !^/public/
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

# PHP Handler - Sesuaikan dengan versi PHP OVH
<IfModule mime_module>
    AddHandler application/x-httpd-alt-php84 .php .php8 .phtml
</IfModule>

# Security: Protect sensitive files
<FilesMatch "^(\.env|\.git|composer\.(json|lock|phar)|artisan)">
    Order allow,deny
    Deny from all
</FilesMatch>

# Disable directory browsing
Options -Indexes