Page Navigation |
[eluser]Unknown[/eluser]
Hi, Am new in codeigniter.need help to fix route issues Am building a small application with codeigniter but am having challenges with navigating from one page to another. firstly: i have an admin called http://localhost/koeweb/dashboard which loads fine. secondly: am trying to go to another page within the admin,say http://localhost/koeweb/dashboard/page2 and i get 404 Page Not Found. My Route: $route['(:any)'] = "home/$1"; $route['default_controller'] = "home"; $route['dashboard/(:any)'] = "dashboard/$1"; $route['dashboard'] = "dashboard"; My controller: Code: <?php
[eluser]CroNiX[/eluser]
What's your base_url set to? Also, your first route should really be the last. Routes work from top down, as soon as something matches, it will use that route. (:any) will match anything, so should be last after all other named routes.
[eluser]Unknown[/eluser]
Code: $config['base_url'] = 'http://localhost/koeweb/'; Please how can i navigate from one page to another? Thanks
[eluser]InsiteFX[/eluser]
Use CI anchor see the url_helper in the Users Guide |
Welcome Guest, Not a member yet? Register Sign In |