<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Send anything not index.php to public... it'll send it back if there's no match
    RewriteCond %{REQUEST_FILENAME} !index.php$
    RewriteRule (.+) public/$1 [L]

    RewriteRule ^ index.php [L]
</IfModule>
