title: Avoid controller function in URL codeigniter
body: <p>I have a controller messages. And there is a function called index.</p>
  
  <pre><code> class messages extends CI_Controller {
  
         public function __construct() {
             parent::__construct();
  
  
         public function Index($userkey=NULL){
  
                       Some functctions
  
   }
  </code></pre>
  
  <p>}</p>
  
  <p>Currently my URL is messages/index/userkey. And i want to convert this to messages/userkey.
  How can i convert this by routes. please help me</p>