RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]

RewriteCond %{HTTP_HOST} ^(.*).thebusinessautomation.com [NC]
RewriteCond %{DOCUMENT_ROOT}/%1/ -d
RewriteCond %1::%{REQUEST_URI} !^(.*?)::/1/?
RewriteRule "^(.*)$" "%{DOCUMENT_ROOT}/%1/$1" [L]

RewriteRule ^([a-zA-Z0-9_-]+)$ country.php?country=$1
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ state.php?country=$1&state=$2
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ county.php?country=$1&state=$2&county=$3

<IfModule mime_module>
  AddHandler application/x-httpd-ea-php82___lsphp .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
