<IfModule mod_rewrite.c>
    Options -Indexes
    RewriteEngine On

    # Preserve auth headers for API requests.
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{HTTP:x-xsrf-token} .
    RewriteRule .* - [E=HTTP_X_XSRF_TOKEN:%{HTTP:X-XSRF-Token}]

    # Send every root request through Laravel's public directory so XAMPP can
    # serve the app from http://localhost/backend-laravel without artisan serve.
    RewriteCond %{REQUEST_URI} !/public/
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
