title: redirect on subfolder with more domains
body: <p>I have a sub folder <code>/blog</code> hosting my blog and the root hosting the application. I have couple of domains which are targeting my root. I would like to redirect with .htaccees all the request on sub folder blog to given domain </p>
  
  <pre><code>domain1
  domain2
  domain3
  </code></pre>
  
  <p>each touching root</p>
  
  <p>if request</p>
  
  <pre><code>domain1/blog
  
  domain2/blog
  </code></pre>
  
  <p>than redirect to <code>domain3/blog</code></p>
  
  <p>What I try</p>
  
  <pre><code>RewriteCond  %{HTTP_HOST}  domain\.de(.*)|domain1\.de(.*)|domain2\.com(.*)|domain3\.de(.*)
  RewriteRule  (.*)  http\://www\.domain4\.com/blog/$1 [R=301]
  
  
  
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /blog/
  
  RewriteCond %{HTTP_HOST} !domain4\.com$ [NC]
  RewriteRule ^blog/(.*)$ http://www.domain4/blog/$1 [L,R=301]
  
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /blog/index.php [L]
  &lt;/IfModule&gt;
  </code></pre>