How to config route ?? |
[eluser]Le Bang[/eluser]
i have two controller: admin.php, root.php. If accessed into http://mysite.com/index.php/admin then it will call controller admin.php Contrariwise I wish all call diplay uniformization root.php. I have to how to set up route
[eluser]frenzal[/eluser]
$route["admin(.+)"] = "admin$1"; $route[":any"] = "root"; If I've understood you correctly that is. This will route everything starting with admin to the admin controller including admin/blah. All the rest will go to root.
[eluser]Le Bang[/eluser]
Thanks. inaccuracy wherewith of request own. I want as flowing: http://mysite.com/index.php/admin/ http://mysite.com/index.php/admin/add/ http://mysite.com/index.php/admin/edit/433/ ===> run admin.php controller else http://mysite.com/index.php/not_name_admin/ http://mysite.com/index.php/abc/ http://mysite.com/index.php/xyz/ ===> run root.php note: root.php is default controller
[eluser]frenzal[/eluser]
that's what i assumed, i might have made a slight mistake though: $route["admin(.+)*"] = “admin$1”; $route[":any"] = “root”; if the default admin controller doesnt work also add: $route["admin"] = “admin”;
[eluser]Le Bang[/eluser]
No solution config $route Is to make to get this asteroid ???
[eluser]Le Bang[/eluser]
Sorry. I speak english very bad. Ought to slander colloq. Wait you sympathetically. Really I need this circumstance resolving. Due to it concern over come to project strategy of mine. |
Welcome Guest, Not a member yet? Register Sign In |