Welcome Guest, Not a member yet? Register   Sign In
URI Routing
#1

[eluser]Unknown[/eluser]
I'm trying to get URI routing working to create friendlier URLS

There are 3 sections to the site - mainsite, dashboard and dashboard admin

I have the dashboard section working like so

Code:
// example.com/dashboard/events/view routes to /events/view
$route['^dashboard/(.+)$'] = "$1";

I'm trying to get the dashboard admin to route in a similar way but having problems, here is my code

Code:
// example.com/dashboard/admin/user/add routes to /admin_user/add
$route['^dashboard/admin/(.+)$'] = "admin_$1";

Any help appreciated

Thanks
Dave
#2

[eluser]Thorpe Obazee[/eluser]
You should probably put this
Code:
// example.com/dashboard/admin/user/add routes to /admin_user/add
$route['^dashboard/admin/(.+)$'] = "admin_$1";
before adding this below
Code:
// example.com/dashboard/events/view routes to /events/view
$route['^dashboard/(.+)$'] = "$1";

if that doesn't work, probably add more information for us to see.




Theme © iAndrew 2016 - Forum software by © MyBB