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

[eluser]AndyBrandy[/eluser]
Hello,

i need help with routing again.

I want all pages will be routed into welcome class, method pages

Code:
$route[':any'] = "welcome/pages";

and admin in first uri_segment will be routed into admin class, but
every second uri_segment have own method in admin class.

i try this code:
Code:
$route['admin'] = 'admin';
but it not works...
#2

[eluser]Armchair Samurai[/eluser]
Check the order which you declare the routes - they're processed in order by the system and higher ones take precedence.
#3

[eluser]AndyBrandy[/eluser]
Sorry,

code is there:

Code:
$route['admin'] = 'admin';
$route[':any'] = "welcome/pages";

but it sill not works...
#4

[eluser]Michael Wales[/eluser]
Because this route:
Code:
$route['admin']

Only matches domain.com/admin. It won't match domain.com/admin/method

Use RegEx, or define all of the admin methods in your routing as well.




Theme © iAndrew 2016 - Forum software by © MyBB