Redirect all http AND https non-www URLS to https://www.xyz.com via htaccess
snippet in htaccess

Redirect all http AND https non-www URLS to https://www.xyz.com via htaccess

user785

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI}$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}$1