title: Exclude a substring in htaccess RewriteRule redirect
body: <p>I manage an old site with multiple domain with the same name, 
  google has indexed some old url with the language structure</p>
  
  <pre><code>http://www.example.com/eng/whatever
  </code></pre>
  
  <p>and</p>
  
  <pre><code>http://www.example.it/eng/whatever
  </code></pre>
  
  <p>and now I don't use this structure anymore, but I want to do a redirect to my new structure</p>
  
  <pre><code>http://www.example.it/en/whatever
  </code></pre>
  
  <p>so everything after the <em>/eng/</em> must be appended to the new structure, excluded the <em>/eng/</em> substring.
  But it doesn't work, I have a redirect to</p>
  
  <pre><code>http://www.example.it/en/eng/whatever
  </code></pre>
  
  <p>which is wrong! I did not want <em>/eng</em> in the redirect url</p>
  
  <p>In my .htaccess I have this</p>
  
  <pre><code>#this will redirect the url with /eng/whatever to www.example.it/en/whatever, regardless from the top level domain
  RewriteRule ^eng\/(.*)$ http://www.example.it/en/$1 [R=301,L]
  
  #redirect example.com on www.example.it/en/
  RewriteCond %{HTTP_HOST} ^([^.:]+\.)*example\.(com|pt)?(:[0-9]*)?$ [NC]
  RewriteRule ^(.*)$ http://www.example.it/en/$1 [R=301,L]
  </code></pre>