RewriteEngine On

# Force HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Redirect root to the shared /en/ folder outside this addon domain root
RewriteCond %{HTTP_HOST} ^(www\.)?web3networkvault\.com$ [NC]
RewriteRule ^$ /../en/ [L,R=301]

# Allow real files/folders
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# PHP handler
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>
RewriteCond %{HTTP_HOST} ^web3networkvault\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.web3networkvault\.com$
RewriteRule ^/?$ "https\:\/\/www\.web3networkvault\.com\/en" [R=301,L]

# 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
