title: wildcard subdomain in .htaccess
body: <p>I want to make a simple page which is available with any (wildcard) subdomain.</p>
  
  <p>For example, you visit hello.domain2.com and the page will echo the name of the subdomain "hello". Also the URL has to stay "hello.domain2.com". This shouldn't be too hard, but since my host has multiple domains in 1 root I'll have to tweak my .htaccess file. </p>
  
  <p>When I check out the htaccess, the host has automaticly made the following rules:</p>
  
  <pre><code>RewriteEngine on    
  
  RewriteCond %{HTTP_HOST}    ^www.domain1.com$
  RewriteCond %{REQUEST_URI}  !^/domain1.com/
  RewriteRule (.*)            /domain1.com/$1 [last]
  RewriteCond %{HTTP_HOST}    ^domain1.com$
  RewriteCond %{REQUEST_URI}  !^/domain1.com/
  RewriteRule (.*)            /domain1.com/$1 [last]
  
  RewriteCond %{HTTP_HOST}    ^www.domain2.com$
  RewriteCond %{REQUEST_URI}  !^/domain2.com/
  RewriteRule (.*)            /domain2.com/$1 [last]
  RewriteCond %{HTTP_HOST}    ^domain2.com$
  RewriteCond %{REQUEST_URI}  !^/domain2.com/
  RewriteRule (.*)            /domain2.com/$1 [last]
  
  RewriteCond %{HTTP_HOST}    ^www.domain3.com$
  RewriteCond %{REQUEST_URI}  !^/domain3.com/
  RewriteRule (.*)            /domain3.com/$1 [last]
  RewriteCond %{HTTP_HOST}    ^domain3.com$
  RewriteCond %{REQUEST_URI}  !^/domain3.com/
  RewriteRule (.*)            /domain3.com/$1 [last]
  </code></pre>
  
  <p>So far I've configured the server to accept any subdomain for my domain2.com, but my host redirects all the subdomains to my root folder. </p>
  
  <p>How can I make the wildcard subdomains go to /domain2.com instead?</p>