I am customizing my routes in codeigniter, here is a sample of my routes.php:
$route['default_controller'] = 'maincontroller/main';
$route['404_override'] = '';
$route['test'] = 'maincontroller/test';
here is the maincontroller class:
class Maincontroller extends CI_Controller
{
public function __construct( )
{
parent::__construct( );
$this->load->library('session');
$this->init( );
}
public function main( )
{
echo "in main";
}
public function test( )
{
echo "test";
}
}
but when i access this url in my browser: /test, i get the server's 404 page not found error.
I have no idea what im doing wrong, i followed the routes guide in codeigniter user guide.