htaccess rewriterule to redirect to new domain
<p>I need to redirect <strong>all articles</strong> from an old domain to a new domain. Old domain articles (non wordpress site) slugs are like:</p>

<pre><code>www.olddomain.com/CATEGORY_NAME/ID_ARTICLE/ARTICLE_SLUG
</code></pre>

<p>New domain articles (wordpress site) slugs are like:</p>

<pre><code>www.newdomain.com/ARTICLE_SLUG
</code></pre>

<p>So, I need htaccess rules to redirect from old domain to the new one, that is, removing the two first segments of the old domain (CATEGORY_NAME and ID_ARTICLE).  </p>

<p>At the moment, I have this in the htaccess file:</p>

<pre><code>RewriteRule ^(.*)$ http://www. newdomain .com/$1 [R=301,L]
</code></pre>

<p>But it makes redirection with all urls.  </p>