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

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteRule ^assets/(.*)$ public/assets/$1 [L]
    RewriteRule ^catalogos/(.*)$ public/catalogos/$1 [L]
    RewriteRule ^favicon\.ico$ public/favicon.ico [L]
    RewriteRule ^robots\.txt$ public/robots.txt [L]

    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} -d
    RewriteRule ^ public/index.php [QSA,L]
</IfModule>

<FilesMatch "^(\.env|composer\.(json|lock)|package(-lock)?\.json|README\.md|MANIFEST\.txt)$">
    Require all denied
</FilesMatch>

RedirectMatch 404 ^/(app|config|docs|storage|third_party|vendor|node_modules)(/.*)?$

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