RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
Replace %{HTTP_HOST}
with your canonical hostname. For example:
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]
You will need to clear your browser cache before testing.
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
Replace %{HTTP_HOST}
with your canonical hostname. For example:
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]
You will need to clear your browser cache before testing.