<IfModule mod_rewrite.c>
    RewriteEngine On
    
    # Mengizinkan akses langsung ke storage
    RewriteCond %{REQUEST_URI} ^/storage/(.*)$
    RewriteRule ^storage/(.*)$ public/storage/$1 [L,NC]
    
    # Redirect semua request ke public folder
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
</IfModule> 