<IfModule mod_rewrite.c>
    RewriteEngine On

    # In per-directory context, patterns match relative paths.
    # Let requests to 'public/' and 'assets/' pass through unchanged.
    RewriteRule ^public/ - [L]
    RewriteRule ^assets/ - [L]

    # Everything else gets routed into /public
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

# Fallback when mod_rewrite is not available
<IfModule !mod_rewrite.c>
    ErrorDocument 404 /public/index.php
</IfModule>

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