title: Avoid Errors due to missing ID in URL header
body: <p>Using Codeigniter + Bonfire framework I can pass variables in my URL. This all works great with GET function like so:</p>
  
  <p>in my view file I get ID of my user and on click pass it to controller again:</p>
  
  <pre><code>&lt;a href="/my_team/index/&lt;?php echo $user-&gt;member-&gt;id; ?&gt;"&gt;Something&lt;/a&gt;
  </code></pre>
  
  <p>controller then receives ID:</p>
  
  <pre><code>public function index($id = null) {
  
      //do stuff with that id...
  }
  </code></pre>
  
  <p>URL looks like this:</p>
  
  <pre><code>http://mysite/my_team/index/26
  </code></pre>
  
  <p>And everything on that page knows user has ID of 26 and display information correctly. </p>
  
  <p>Problem is if I manually remove that number from the URL so it looks like this:</p>
  
  <pre><code>http://mysite/my_team/index/
  </code></pre>
  
  <p>and leave the index in the URL I now get a whole bunch of errors because the site can't get the ID from URL. How can I avoid this? Maybe hide the <code>index</code> public function from the URL using .htacces or something? </p>