title: codeigniter - routing a non existent URI
body: <p>So in this <code>codeigniter</code> installation, I have a controller called <code>user</code>. In its <code>index()</code> I accept a user_name and show that user's profile.</p>
  
  <pre><code>class User extends CI_Controller
  {
    function index($user_name)
    {
      //show user profile...
    }
  }
  </code></pre>
  
  <p>This works fine. However to view a profile the visitor has to go to: <code>&lt;site&gt;/user/john_doe</code></p>
  
  <p>I want the URL to be <code>&lt;site&gt;/john_doe</code>. I know this is not possible using the default <code>controller/function/arg</code> setup that <code>codeigniter</code> has. Can I map this in <code>routes</code>such that if a visitor types <code>&lt;site&gt;/john_doe</code>, the system recognizes there is no controller called <code>john_doe</code> it internally renders <code>&lt;site&gt;/user/john_doe</code> (however it should keep the original short url)</p>
  
  <p>Also, there will be a side effect concern of what if a user creates a username called user which is already a valid controller...but I guess that is a secondary concern (can block all controller names as keywords so user cannot register one of them)</p>