RewriteEngine On

# ============================
# Canonical: https + www
# - Si NO es www.heartline.cl  O  si no viene por HTTPS -> redirige.
# - Preserva ruta y query string.
# ============================
RewriteCond %{HTTP_HOST} !^www\.heartline\.cl$ [OR]
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://www.heartline.cl%{REQUEST_URI} [L,R=301]

# --- cPanel PHP handler (déjalo igual) ---
# php -- BEGIN cPanel-generated handler, do not edit
# Configure el paquete “ea-php81” como el lenguaje de programación predeterminado “PHP”.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

# (Opcional, para testear que se lee el .htaccess; luego bórralo o coméntalo)
# <IfModule mod_headers.c>
#   Header set X-Debug-HTACCESS "reached"
# </IfModule>
