Options -Indexes

# Optional: if auto-detect ever fails on hosting, uncomment and set the absolute MAIN app public path.
# SetEnv MAIN_PUBLIC_PATH /home/USERNAME/preligram.com/public

RewriteEngine On

RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ public/$1 [L,QSA]

# (Optional but recommended) sensitive file block
<FilesMatch "(\.env|artisan|composer\.(json|lock)|package(-lock)?\.json|yarn\.lock|phpunit\.xml|server\.php|webpack\.mix\.js|vite\.config\.(js|ts)|\.git|\.gitignore|error_log)$">
    Require all denied
</FilesMatch>

# php -- BEGIN cPanel-generated handler (optional)
<IfModule mime_module>
  # Laravel requires PHP 8.2+ (composer.json: "php": "^8.2")
  AddHandler application/x-httpd-ea-php82 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler

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