Welcome Guest, Not a member yet? Register   Sign In
help with routing
#1

[eluser]AndyBrandy[/eluser]
Hello,

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...
#2

[eluser]xwero[/eluser]
you can do
Code:
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.
#3

[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:

Controller
Code:
function index()
{
$this->pages();
}
#4

[eluser]AndyBrandy[/eluser]
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.




Theme © iAndrew 2016 - Forum software by © MyBB