title: How to create a catch-all route in Ruby on Rails?
body: <p>I want to have all requests that satisfy a certain constraint to go to a specific controller. So I need a catch-all route. How do I specify that in Rails? Is it something like this?</p>
  
  <pre><code>match '*', to: 'subdomain_controller#show', constraints: {subdomain: /.+\.users/}
  </code></pre>
  
  <p>Will that really catch all possible routes? It's important that none slip through even if there are many nested directories.</p>
  
  <p>Using Ruby on Rails 3.2, but ready to upgrade to 4.0.</p>
  
  <p><em><strong>UPDATE</em></strong>: <code>'*path'</code> seems to work. However, the issue I'm running into is whenever the file exists in my <code>public</code> directory, Rails renders that instead.</p>