DirectoryIndex public/index.php index.php
Options -Indexes

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteRule ^(?:app|bootstrap|config|database|docs|routes|storage)(?:/|$) - [F,L]
    RewriteRule ^(?:\.env|\.env\..*|README\.md)$ - [F,L]

    RewriteRule ^(assets|uploads)/(.*)$ public/$1/$2 [L,NC]
    RewriteRule ^(favicon\.ico|robots\.txt)$ public/$1 [L,NC]

    RewriteCond %{REQUEST_URI} !^/public/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^$ public/index.php [QSA,L]

    RewriteCond %{REQUEST_URI} !^/public/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)$ public/index.php [QSA,L]
</IfModule>

<FilesMatch "^(\.env|\.env\..*|README\.md)$">
    Require all denied
</FilesMatch>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php85” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php85 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
