Redirect Wordpress multisite to use new domain

Hello, people, I need help creating htaccess redirects to redirect a wordpress multisite from one domain to a wordpress multisite on a new domain. I need to redirect to and to , and to
Anyone can help me ?

Replying to myself:

#redirect subdomains
RewriteCond %{HTTP_HOST} ^((?!www).+)\$
RewriteRule ^(.*)$$1 [L,R]

#redirect domain

RewriteCond %{HTTP_HOST} ^(www\.)?$
RewriteRule ^(.*)$$1 [L,R]

That is what is working for my cyberpanel…