help with routing


i make route restriction : route[':any'] = "welcome/pages"
but i need step down, when i get /admin/ then opened class is admin, else is open welcome...

you can do
route['admin/:any'] = 'admin/pages';
route[’:any’] = “welcome/pages”
Which should work fine.

According to the user guide :
Quote:Routes will run in the order they are defined. Higher routes will always take precedence over lower ones.

[eluser]Phil Sturgeon[/eluser]
This isnt really what routing is for, this is more redirects which can be handles in the controller with redirect('welcome/pages') or:

function index()

Ok, thx for answers..

I suggest more for better specifiacation what i want.

I need cool uri where isn't any class f.e.: "welcome", only methods,
but when uri has first segment admin, than is opened class admin, not default.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.