I'm new in Codeigniter framework and got routing problem. I have Main controller and Tournaments controller. My routes look like this:
$route['default_controller'] = 'main';
$route['main'] = 'main';
$route['tournaments/results/(:num)'] = 'tournaments/results/$1';
When I go to localhost/tournaments/results/1
and then click to link "Main" I got localhost/tournaments/results/main
instead of localhost/main
What is wrong with my routes or maybe problem is somewhere else?
Probably your link to 'Main' is wrong, not your routes files. Check your link.