Welcome Guest, Not a member yet? Register   Sign In
Routes Questions
#1

[eluser]Unknown[/eluser]
I setup a route for our admin views:
$route['admin/([a-z]+)/([a-z]+)'] = "$1/admin_$2";

Basically this would route something like admin/blog/edit to blog/admin_edit in our blog controller.

However, is there a way that I can do this so that I don't have to pass the index function name in the url? So that admin/blog/ would auto go to blog/admin_index ?

- Andy
#2

[eluser]zdknudsen[/eluser]
I bet this will do the trick:
$route[’admin/([a-z]+)/([a-z]+)’] = “$1/admin_$2”;
$route[’admin/([a-z]+)’] = “$1/admin_index”;




Theme © iAndrew 2016 - Forum software by © MyBB