I want to do this: if they do https://example.com
I want to redirect them to https://www.example.com
(add the www.
). I have tried oodles of things to no avail.
Redirect https://example.com/<anything> to https://www.example.com/<anything>
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{SERVER_PORT} =443
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
This code is in httpd.conf but has been tried in .htaccess and ssl.conf.
Can anyone help?