# ----------------------------------------------------------
# Force HTTPS on all pages
# ----------------------------------------------------------
RewriteEngine On

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

# ----------------------------------------------------------
# Redirect root domain to /en/
# ----------------------------------------------------------
RewriteCond %{HTTP_HOST} ^(www\.)?aurevixgo\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/en/
RewriteRule ^$ https://www.aurevixgo.com/en/ [R=301,L]

# ----------------------------------------------------------
# Clean URLs (for PHP files only)
# Example: /about → about.php
# ----------------------------------------------------------
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\.php$
RewriteRule ^([^/]+)/?$ $1.php [L]

# ----------------------------------------------------------
# Optional: Strict HTTPS Security (HSTS)
# Uncomment after confirming SSL is stable
# ----------------------------------------------------------
# <IfModule mod_headers.c>
#     Header always set Strict-Transport-Security "max-age=16070400; includeSubDomains"
# </IfModule>

# ----------------------------------------------------------
# Lightweight PHP Configuration (for speed)
# ----------------------------------------------------------
<IfModule lsapi_module>
   php_value memory_limit 384M
   php_value upload_max_filesize 320M
   php_flag zlib.output_compression On
</IfModule>

# ----------------------------------------------------------
# PHP Version Handler (cPanel default)
# ----------------------------------------------------------
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>
RewriteCond %{HTTP_HOST} ^easydigitalincomehub\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.easydigitalincomehub\.com$
RewriteRule ^/?$ "https\:\/\/www\.easydigitalincomehub\.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
