<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} !^/public/
    RewriteRule ^(.*)$ /public/$1 [L]
</IfModule>

# To prevent access to .env and other sensitive files
<Files .*>
    # Apache 2.2
    <IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
    </IfModule>
    # Apache 2.4
    <IfModule mod_authz_core.c>
    Require all denied
    </IfModule>
</Files>
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteCond %{HTTP_HOST} ^jaetun\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.jaetun\.com$
RewriteRule ^/?$ "https\:\/\/jaetun\.com\/" [R=301,L]

