title: Redirect Addresses to localhost by Pattern on Mac OS X
body: <p>I'm not even 100% sure how to ask this question. The answer might be out there, but I can't find it.</p>
  
  <p>So I've set up virtual hosts for my Mac and I do all my development locally on my computer. I have a <code>vhost</code> folder in my <code>Sites</code> folder, and I have a list of folders, such as:</p>
  
  <pre><code>recipes.cam
  database.cam
  sandbox.cam
  codeigniter.cam
  </code></pre>
  
  <p>and in my <code>/etc/hosts</code> file I have an entry for each one:</p>
  
  <pre><code># vhosts
  127.0.0.1 recipes.cam
  127.0.0.1 database.cam
  127.0.0.1 sandbox.cam
  127.0.0.1 codeigniter.cam
  # ...    
  </code></pre>
  
  <p>And this works great. When I go to <a href="http://recipes.cam" rel="noreferrer">http://recipes.cam</a> in my browser, it shows the contents of the <code>~/Sites/vhosts/recipes.cam</code>. </p>
  
  <p><strong>So this is my question</strong>: Is there a way to have any address that end in <code>.cam</code> to redirect to localhost? So I don't have to create a new entry in <code>hosts</code> every time I add a new directory (it happens pretty often).</p>
  
  <p>I tried <code>127.0.0.1 *.cam</code> in my <code>hosts</code> file, but it didn't work :-/</p>