Options -Indexes -MultiViews
DirectoryIndex disabled

RewriteEngine On

# --- Force HTTPS and www ---
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.adaerotech.com/$1 [R=301,L]

# --- Proxy the homepage (root path) ---
RewriteRule ^$ http://127.0.0.1:4182/ [P,L]

# --- Proxy all other requests unless they are actual files or directories ---
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://127.0.0.1:4182/$1 [P,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
