title: A specific 301 redirection to another domain via htaccess
body: <p>There are a lot of answers here at Stack Overflow regarding the redirection via htaccess and I have some basic understanding about this. Instead of redirecting the same paths to the new domain, I need these results:</p>
  
  <ol>
  <li>Redirect both olddomain.com and www.olddomain.com to hxxps://www.newdomain.com</li>
  <li>Redirect www.olddomain.com/example-page to hxxps://www.newdomain.com/somepage</li>
  </ol>
  
  <p>Please note in condition 2 that I want to redirect the subpages to different paths on new domain. The first part is easy for me but the second one challenges me. How can I achieve these results (for 301 redirect)?</p>