CodeIgniter Forums
Routing - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Routing (/showthread.php?tid=41919)



Routing - El Forum - 05-20-2011

[eluser]donald.tbd[/eluser]
Hello!

I just read "http://philsturgeon.co.uk/news/2009/07/Create-an-Admin-panel-with-CodeIgniter" and desided to use the second method described and ran into a problem immediatly.
I installed a clean copy of CI, made a controller application/controllers/admin/login.php and in in routes.php i wrote $route['admin'] = 'admin/login';.
Now i expected that if ill write http://localhost/mysite/admin i would be lead to my controller, i wasnt, got an error that page dosent exist.
I tried writing $route['default_controller'] = "admin/login"; and when i wrote http://localhost/mysite/ i got where i wanted.
I dont even know what to do next, did i do something wrong or is something broken?

Thanks, Donald.


Routing - El Forum - 05-20-2011

[eluser]donald.tbd[/eluser]
I found out what the problem is. Apperently i have to write http://localhost/mysite/index.php/admin, not just mysite/admin.
Sorry for the unnessecery thread Smile