Welcome Guest, Not a member yet? Register   Sign In
Cleaning up routes help
#1

[eluser]opel[/eluser]
I have set the routes on my site as follows :
Code:
$route['admin/index'] = "admin/index";
$route['admin/login'] = "admin/login";
$route['admin/logout'] = "admin/logout";
$route['admin/register'] = "admin/register";
$route['admin/dashboard'] = "admin/dashboard";
$route['admin/test'] = "admin/test";
$route['admin/([a-z]+)'] = "$1/admin/index";
$route['admin/([a-z]+)/([a-z]+)'] = "$1/admin/$2";

I am using the HMVC module so that I can have a two controllers per module a front end (modulename.php) and admin.php for the back end.

This route allows me to have admin/blog etc for my administration area, and the one below admin/blog/add . I guess I will have to add in a 3rd too for admin/blog/add/3

The problem lies in the top lines as I have to manually create a route for specific pages in my admin module admin.php, is there any way I can cut these routes down into a neater way ?

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB