<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    # If the request is for a real file or directory, serve it directly
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]

    # Otherwise forward to public/index.php
    RewriteRule ^(.*)$ public/index.php [QSA,L]
</IfModule>

# Prevent directory listing
Options -Indexes
