I am trying to accomplish the following... if a user comes to the site via
123abc.com (with or without www), and 123abc.com/hello (with or without www) they should automatically be taken to https://www.123abc.com/URI_IF_NEED
...
this is what I have so far. the base domain redirects correctly but any URL structures with pages/dir following it does not.
trying to achieve https://www.123abc.com and/or https://www.123abc.com/hello
ServerName www.123abc.com
ServerAlias 123abc.com
DocumentRoot "/mnt/var/www/html/"
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule ^ https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]