title: Apache - Subdomain redirect
body: <p>I'm running a django application with fcgi<br />
  when I do this with one application, my .htaccess file looks like<br /></p>
  
  <pre><code>
      Options +FollowSymLinks
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^(.*)$ app.fcgi/$1 [QSA, L]
  </code></pre>
  
  <p>and that works fine.<br /></p>
  
  <p>Now, I want to run different applications on different subdomains.<br />
  So I will create a *.fcgi file for every app. <br />
  Basically, what I want to do is to redirect the request to subdomain.mydomain.com to the subdomain.fcgi file.<br /></p>
  
  <p>I've tryed this, but didn't work<br /></p>
  
  <pre><code>
      Options +FollowSymLinks
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{HTTP_HOST} ^(.*)\.mydomain\.com$
      RewriteRule ^(.*)$ %1.fcgi/$1 [QSA, L]
  </code></pre>