title: .htaccess redirect if domain is not X
body: <p>I want to redirect trought .htaccess if the domain is not:</p>
  
  <ul>
  <li>www.domain.tld</li>
  <li>domain.tld</li>
  </ul>
  
  <p><br></p>
  
  <pre><code>RewriteCond %{HTTP_HOST} !^(www.)?domain.tld [NC]    
  RewriteRule ^(.*)$ https://domain.tld/ [L,R=301,QSD]
  </code></pre>
  
  <p>Is this right?</p>