CodeIgniter Forums
Routing - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Routing (/thread-39875.html)



Routing - El Forum - 03-23-2011

[eluser]danst[/eluser]
I have a little problem with routing my pages. I have two controller classes: one is the default welcome class and the other one is a form class that I've written myself. By default if I type in the browser http://mywebsite.com/index.php it'll display the welcome page, which is expected as I have $route['default_controller'] = "welcome"; in my routes.php file. However, if I try accessing my form class by typing in the browser http://mywebsite.com/index.php/form/ or http://mywebsite.com/index.php/form/index or anything after index.php (http://mywebstie.com/index.php/adfadfsad I thought it should display an error page in this case) it'll still display the welcome page. Any ideas on what I'm doing wrong. I know if make $route['default_controller'] = "form"; it'll load the form page but I want to be able to directly access it without changing my rountes.php file.