title: Redirect all traffic (http and https) to root of another domain
body: <p>I have a domain that's not to be used anymore. I want to redirect all from <a href="http://www.old.com/" rel="nofollow noreferrer">http://www.old.com/</a> and <a href="https://www.old.com" rel="nofollow noreferrer">https://www.old.com</a> to <a href="http://www.new.com/" rel="nofollow noreferrer">http://www.new.com/</a> (all links to root domain), no matter what page the user's attempted to access on www.old.com.</p>
  
  <p>I have this code in .htaccess but it does not redirect the links with https (404):</p>
  
  <pre><code>Options +FollowSymLinks -MultiViews
  RewriteEngine on
  
  RewriteCond %{HTTP_HOST} ^(www\.)?old\.com$ [NC]
  RewriteCond %{HTTPS} !^on
  RewriteRule ^ https://www.new.com/ [R=301,L]
  </code></pre>