title: Adding localhost subdomains in apache virtual hosts
body: <p>I am trying to redirect all subdomains of hothouse to go to hothouse\testsite, but I cannot get it to work. </p>
  
  <p>I dont understand the difference between DocumentRoot and VirtualDocumentRoot, not sure if that makes any difference.</p>
  
  <p>Any ideas why it is not working 'testsite.hothouse' redirects fine. 'test.hothouse' or any subdomain.hothouse does not (redirects to 'www.subdomain.hothouse'). </p>
  
  <p>I have spent all day trying to work this out I have cleared all my browser caches. BTW I am using WAMP</p>
  
  <pre><code>DocumentRoot "D:\wamp\www" 
  &lt;Directory "D:\wamp\www"&gt; 
      Options Indexes FollowSymLinks Includes ExecCGI 
      AllowOverride All 
      Order allow,deny 
      Allow from all 
  &lt;/Directory&gt;
  
  &lt;VirtualHost *:80&gt;  
  DocumentRoot "D:\wamp\www"
  ServerName localhost
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:80&gt;  
  VirtualDocumentRoot "D:\wamp\www\hothouse\testsite"
  ServerName testsite.hothouse
  ServerAlias test.hothouse
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:80&gt;
    VirtualDocumentRoot "D:\wamp\www\hothouse\testsite"
    ServerName subdomain.hothouse
    ServerAlias *.hothouse
  &lt;/VirtualHost&gt;
  </code></pre>