title: How to whitelist subdomains in apache or in symfony2
body: <p>Lets say there are two domains one is <code>my.example.com</code> and <code>xyz.example.com</code> the <code>xyz.example.com</code> is invalid and when accessed it should redirect to 404. the <code>my.example.com</code> is valid and should redirect to the login page</p>
  
  <p>now lets say its not just two subdomains its unrestricted number of subdomains which are allowed on <code>example.com</code> using the <code>* wildcard</code> character</p>
  
  <p>how can i 'whitelist' certain subdomains to show login page (ofcourse after the user registers the subdomin its put in the whitelist) and the rest non-whitelisted subdomains to show 404 page.</p>
  
  <p>can this be done with some apache configurations? some apache modules?
  or if this can be achieved with symfony2.8 <strong>without database interaction</strong> that would do a world of good to my web application</p>
  
  <p>when i said whitelist i just used the word to get my point across, im open to any kind of solution that is in good practice</p>