Forum Moderators: phranque
[edited by: phranque at 12:22 am (utc) on Jan 19, 2015]
[edit reason] Please Use example.com [webmasterworld.com] [/edit]
# if the request is on a non-secure port for a hostname on either of the 2 secure domains,
# externally redirect the request to the canonical (secure) protocol and (www.) hostname
RewriteCond %{SERVER_PORT} !=443
RewriteCond %{HTTP_HOST} \.(example1|example2)\.com$
RewriteRule ^(.*)$ https://www.%1.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} http://example.com [NC,OR]