# Use dashboard.php as the default landing page instead of index.php
DirectoryIndex dashboard.php

# Make sure index.php is ignored as a default file
<IfModule mod_rewrite.c>
RewriteEngine On

# If someone tries to access index.php directly, redirect to dashboard
RewriteCond %{THE_REQUEST} \s/+index\.php[\s?] [NC]
RewriteRule ^index\.php$ /dashboard.php [R=301,L]

# Allow direct access to existing files and directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# (Optional) If you want all unmatched URLs to redirect to dashboard.php
# Uncomment the next 2 lines:
# RewriteRule ^.*$ dashboard.php [L,QSA]

</IfModule>

# 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___lsphp .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
