

 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_URI} (.+)/$
 RewriteRule ^ %1 [L,R=301]

RewriteCond %{REQUEST_URI} !^public
RewriteCond %{REQUEST_URI} !^/storage
RewriteRule ^(.*)$ public/$1 [L]


<FilesMatch "\.(jpg|jpeg|png|gif)$">
    <IfModule mod_php.c>
        php_flag file_uploads On
    </IfModule>
</FilesMatch>
<Files .env>
    Order Allow,Deny
    Deny from all
</Files>
<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes…
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Send all requests to index.php
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

