Files
SODEW/sodew-bash-main/assets/openlitespeed/rules/https-www.rules
T
2026-08-18 09:40:08 +02:00

12 lines
352 B
Plaintext

RewriteEngine On
# no www -> add www + https
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# www, http -> https
RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
RewriteCond %{HTTP:Forwarded} !proto=https [NC]
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]