Add .htaccess redirects to HTTPS and non-www

This commit is contained in:
Alex Assistant 2026-02-19 17:59:00 +03:00
parent 31efcd44ab
commit 6b72b57184

9
.htaccess Normal file
View File

@ -0,0 +1,9 @@
RewriteEngine On
# Force HTTPS
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
# Force non-www
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]