title: Codeigniter Prevent Passing Parameter to Function to Avoid Non-Existent URI Segment
body: <p>So I have a page:</p>
  
  <p><a href="http://www.mysite.com/controller/function" rel="nofollow">http://www.mysite.com/controller/function</a> </p>
  
  <p>The function is defined in the controller as:</p>
  
  <pre><code>function ()
  {
  //some stuff here
  }
  </code></pre>
  
  <p>However it is possible to resolve the URL:
  <a href="http://www.mysite.com/controller/function/blablabla" rel="nofollow">http://www.mysite.com/controller/function/blablabla</a></p>
  
  <p>i.e. "blablabla" can be passed to the function and forms an additional URI segment, but still brings up the same page. I have the same issue with a number of controllers / functions - how do I prevent parameters being passed to the function (or appearing as a URI segment)?</p>
  
  <p>I've been working with Codeigniter and PHP for around 6 months very part time, so forgive me if the answer is obvious but my searches haven't been fruitful on this.</p>
  
  <p>My goal is optimised SEO - unsure whether better to redirect the page with the extra URI segment to the correct page or to the 404 page.</p>