help with routing again


i need help with routing again.

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

$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:
$route['admin'] = 'admin';
but it not works...

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


code is there:

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

but it sill not works...

[eluser]Michael Wales[/eluser]
Because this route:

Only matches It won't match

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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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