title: code igniter dynamic routing
body: <p>I am using code igniter.</p>
  
  <p>What I want to do is,</p>
  
  <p>if a page is visited that does not exist </p>
  
  <blockquote>
    <p>example.com/idontexist</p>
  </blockquote>
  
  <p>Then I want to first check a database to see if <code>idontexist</code> is in the database.</p>
  
  <p>If it is then I want to route the user to</p>
  
  <blockquote>
    <p>example.com/action/idontexist.</p>
  </blockquote>
  
  <p>How can I do this?</p>