Feb 9, 2018Apache Redirect for Canonical DomainRewriteEngine onRewriteCond %{HTTP_HOST} !^www.example.com$RewriteRule (.*) https://www.example.com$1 [R=301,L]RewriteCond %{HTTPS} !=onRewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]Share onAPACHEHTTPDMOD_REWRITEREWRITE