title: Rails routing :except question
body: <p>I'm trying to make a simple blog with a <em>posts</em> controller route to the root url rather than localhost/posts/:id. </p>
  
  <p>I added the following to my routes file...</p>
  
  <pre><code>match '/:id', :to =&gt; 'posts#show', :as =&gt; 'post'
  </code></pre>
  
  <p>Which worked well enough. It has since broken my search route. </p>
  
  <pre><code>match 'search/:q', :to =&gt; 'posts#query', :as =&gt; 'search'
  </code></pre>
  
  <p>It looks like rails is trying to find a post with the id of my search query. Is there a way of doing something like the following to get the routes file to assume everything after the root url is a post id EXECPT anything starting with 'search'?</p>
  
  <pre><code>match '/:id', :to =&gt; 'posts#show', :as =&gt; 'post', :except =&gt; 'search'
  </code></pre>