# ===== SelfTherapy host config =====

# 1) Default homepage (index). If you change your main page, update this list.
DirectoryIndex index.html therapist.html dashboard.html

# 2) Force HTTPS
RewriteEngine On
# Redirect http -> https
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# 3) Canonical host (optional). Choose one version and comment the other.
# Redirect www -> non-www
RewriteCond %{HTTP_HOST} ^www\.selftherapy\.me$ [NC]
RewriteRule ^ https://selftherapy.me%{REQUEST_URI} [L,R=301]

# (Alternative) Redirect non-www -> www
# RewriteCond %{HTTP_HOST} ^selftherapy\.me$ [NC]
# RewriteRule ^ https://www.selftherapy.me%{REQUEST_URI} [L,R=301]

# 4) Single Page App fallback (optional). Uncomment if you use client-side routing.
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule . /index.html [L]

# 5) Friendly 404 (optional)
# ErrorDocument 404 /404.html
