# To prevent access to .env and other files
<Files .*>
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</Files>

<IfModule mod_rewrite.c>
RewriteEngine On
# Send root request directly to CodeIgniter
RewriteRule ^$ public/index.php [L]
# Send all other requests to public folder and let CI handle routing
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ public/index.php?/$1 [L,QSA]
</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