RewriteEngine On

# Set the root folder to the subdomain root
#RewriteBase /

# Prevent direct access to all folders except the project root folder
RewriteCond %{REQUEST_URI} !^/ba/ [NC]
#RewriteCond %{REQUEST_URI} !^/$ [NC]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [F]

# Rewrite all other requests to index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

# Disable directory indexing.
Options -Indexes

# cPanel PHP handler configuration.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php81___lsphp .php .php8 .phtml
</IfModule>