RewriteEngine On

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

#  Redirect non-www ke www
RewriteCond %{HTTP_HOST} ^decamellia\.com$ [NC]
RewriteRule ^(.*)$ https://www.decamellia.com/$1 [L,R=301]

#  Redirect trailing slash dari file .html
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.+\.html)/$ /$1 [R=301,L]

#  Redirect spesifik maksud-healing-yang-sebenarnya-ramai.html/ ke maksud-healing-yang-sebenarnya-ramai.html (opsional)
RewriteRule ^maksud-healing-yang-sebenarnya-ramai\.html/$ /maksud-healing-yang-sebenarnya-ramai.html [R=301,L]