RewriteEngine On

# RewriteCond %{HTTP:X-Forwarded-Proto} !https
# RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R=301,L]


RewriteRule ^\.htaccess$ - [F]
 
RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ /public/index.php [NC,L]
 
RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ /public/$1
 
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]

FallbackResource /public/index.php