title: Rails conditional routing
body: <p>In my url, I want </p>
  
  <p><code>localhost/12345</code> to be routed to <code>/client/information/12345</code></p>
  
  <p>However, I also want users to be able to call</p>
  
  <p><code>/client</code> to go to <code>/client/index</code></p>
  
  <p>I was not able to do this with</p>
  
  <p><code>match ':id' =&gt; 'client#information'</code></p>
  
  <p>because then the word 'client' would be set as the value of <code>params[:id]</code></p>
  
  <p>How can I create a route that will conditionally route to <code>/client/information</code> if the id is number, otherwise go to the <code>/client/index</code></p>