<IfModule mod_rewrite.c>
RewriteEngine On

# Redirect HTTP to HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Redirect all requests to the public directory
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
