title: redirect to 404 wildcard subdomain
body: <p>I setup a wildcard A record on my domain registrar. Now if a user access a missing subdomain on my domain, they will be redirected to the homepage. Currently my initial setup was this:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
    ServerAdmin webmaster@localhost
    RewriteEngine On
    RewriteRule ^(.*)$ http://domain.com$1 [R]
    DocumentRoot /var/www
    &lt;Directory /&gt;
      Options FollowSymLinks
      AllowOverride None
    &lt;/Directory&gt;
    # more below...
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Any wildcard subdomain or if my IP is entered via URL will redirect to the homepage. Can I do something about this that will redirect (HTTP redirect perhaps) the wildcard subdomains to 404 page instead of to homepage?</p>