How do you remove the controller from the URL? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How do you remove the controller from the URL? (/showthread.php?tid=17929) Pages:
1
2
|
How do you remove the controller from the URL? - El Forum - 04-20-2009 [eluser]learning_php[/eluser] Hi, I not to bothered as it a admin panel to update the database. It's in its own controller called admin which returns a 404. Thanks How do you remove the controller from the URL? - El Forum - 04-20-2009 [eluser]Dam1an[/eluser] In which case, the easiest way, assuming you don't have too many functions in the homepage controller would be to do Code: $route['a'] = "homepage/a"; Alternativly (the idea just came to mind), you could take advantage of the fact that higher roues have precedence over lower routes, so you could do Code: $route['admin/(:any)'] = "admin/$1"; this way, any URL such as wedding-site/admin/do-something would go to the admin controller, whereas wedding-site/do-something-else would go to the homepage controller How do you remove the controller from the URL? - El Forum - 04-20-2009 [eluser]learning_php[/eluser] Thanks it all seems to be working correctly |