title: How to pass parameters to the index function of default controller in Codeigniter
body: <p>In my Codeigniter project, I need to generate URLs like this <code>example.com/username</code>. Here 'username' is a parameter to the default controller 'Home'.</p>
  
  <p>I am using remap to pass params to the default controller's index function.</p>
  
  <pre><code> function _remap($param)
   {
      $this-&gt;index($param);
   }
  </code></pre>
  
  <p>I am working on a CodeIgniter project. I have a default controller as 'Home'.
  My site URL is example.com. What I need to do is pass the parameter to the default controller 'Home' so I can show profiles like this:</p>
  
  <pre><code>example.com/username
  </code></pre>
  
  <p>But I can't use this URL. The only way I can pass the parameters to the default controller and make it work is to show the default controller in the URL.
  like  example.com/home/username.   Which is not what I need. </p>
  
  <p>I need the default controller not to show in the URL and generate URLs like <code>example.com/username</code>.</p>