RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !new-example.com$ [NC]
RewriteRule ^(.*)$ http://new-example.com/$1 [L,R=301]
#Redirection vers le nom de domaine principal
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on [NC,OR]
RewriteCond %{HTTP_HOST} !^www.domain1.com [NC]
RewriteRule ^(.*) https://www.domain1.com/$1 [R=301,L]
</IfModule>