Routing

#1
[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.

#2
[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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.