title: Codeigniter, bypassing the main or default controller
body: <p>i tried to find solution, but i think i am quite doing something wrong here,</p>
  
  <p>i hope any one with good knowledge of codeigniter routing can help me in this regard.</p>
  
  <p>what i want is that,</p>
  
  <p>i have default controller named <code>main</code></p>
  
  <pre><code>$route['default_controller'] = "main";
  $route['404_override'] = '';
  </code></pre>
  
  <p>my site urls are like</p>
  
  <pre><code>mydomain.com/main/#home
  mydomain.com/main/#search
  mydomain.com/main/#login
  </code></pre>
  
  <p>what i want is to remove/hide the <code>main</code> from center and links can directly work.
  like this</p>
  
  <p><code>mydomain.com/#home</code></p>
  
  <p>however i did succeeded a little using codeigniter documentation.
  This is what i did to achieve it.
  in route file i added this</p>
  
  <pre><code>$route['(:any)'] = "main/$1";
  </code></pre>
  
  <p>it worked but it messed up with other links.</p>
  
  <p>First now <code>domain.com/main/#home</code> stopped working.
  second, now i cant have other controller name here??</p>
  
  <p>i mean if i try this <code>domain.com/virtualvault/#search</code>, it wont work..</p>
  
  <p>What i am trying to have that,
  When i go to <code>domain.com/main/#home</code> it should go to home page
  and also when i try <code>domain.com/#home</code> it should also go to same home page
  not to forget that i want other controllers to be working fully.
  i mean, <code>domain.com/othercontrollername/#function</code> should work.</p>
  
  <p>what and how to achieve it, .htaccess or route php file..</p>
  
  <p>i even tried this below route code.</p>
  
  <pre><code>$route['#+(:any)'] = "main/#+$1";
  </code></pre>
  
  <p>but i am no good in this routing or .htaccess files.</p>
  
  <p>any ideas how to achieve it??</p>