I have a Controller named Categories and one function in it called index with 1 parameter $cat_id
so it looks like this:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class categories extends CI_Controller {
function __construct(){
parent::__construct();
}
public function index($cat_id = null){
}
}
the problem comes when i call it from the browser... i use this:
http://www.mysite.dev/categories/12311323
but returns 404 error page
instead if i use
http://www.mysite.dev/categories/index/12313131
will work fine...
how can i make sure it wont need index in the URL for the index function?