title: routing issue in codeigniter
body: <p>I have index controller as default with index method.</p>
  
  <pre><code>class Index extends CI_Controller {
    public function __construct(){
        parent::__construct();
    }
    public function index(){
       // main page of website...
    }
  }
  </code></pre>
  
  <p>Now, If there is a parameter in index method, then I want render different view. something like this:</p>
  
  <pre><code> public function index($username){
     if($username!=''){
        // render page 1...
     }
     else{
        // main page of website...
     }
  }
  </code></pre>
  
  <p>when I pass the parameter, it says: <code>The page you requested was not found.</code></p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I tried by updating routes in <code>routes.php</code> file:</p>
  
  <pre><code>$route['index/(:any)'] = 'index/$1';
  </code></pre>
  
  <p>I want user to access their profile in this URL: <code>example.com/username</code></p>
  
  <p>Right now, I need to type: <code>example.com/index/index/username</code></p>