title: How to redirect folder to another domain
body: <p>I want to redirect an old domain that is in a folder (eg:olddomain.com/folder) to the root of a new domain (<a href="http://www.newdomain.com/" rel="nofollow noreferrer">http://www.newdomain.com/</a>).</p>
  
  <p>I modified the htacess that is in the folder of the old domain with the following code:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
    RewriteRule ^folder/(.*)$ http://www.newdomain.com/$1 [R=301,L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>But it doesn't work. </p>
  
  <p>Any idea on what I'm missing?</p>
  
  <p>Thanks!</p>