Welcome Guest, Not a member yet? Register   Sign In
Problem: Routing Using Wild Cards
#4

[eluser]CroNiX[/eluser]
Along the lines of what InsiteFX said, you need to reverse all of your routes so the ones covering the most segments comes before those with fewer.

Like the post you did just before this one. Reverse them all and same with the others.
Code:
// staff Area
$route['([staff][a-z_]+)/(:any)/(:any)/(:any)'] = 'staffarea/$1/$2/$3/$4';
$route['([staff][a-z_]+)/(:any)/(:any)'] = 'staffarea/$1/$2/3';
$route['([staff][a-z_]+)/(:any)'] = 'staffarea/$1/$2';
$route['([staff]+[a-z_]+)'] = 'staffarea/$1';

Also, some of your regex differs slightly with an extra + (or missing one). Check the last line of the code I posted vs the others. There is a + between [staff] and [a-z_]. Your other rules dealing with other than staff have some missing/added as well.


Messages In This Thread
Problem: Routing Using Wild Cards - by El Forum - 12-15-2012, 03:02 AM
Problem: Routing Using Wild Cards - by El Forum - 12-15-2012, 03:18 AM
Problem: Routing Using Wild Cards - by El Forum - 12-15-2012, 03:26 AM
Problem: Routing Using Wild Cards - by El Forum - 12-15-2012, 10:57 AM
Problem: Routing Using Wild Cards - by El Forum - 12-15-2012, 11:22 AM
Problem: Routing Using Wild Cards - by El Forum - 12-15-2012, 03:49 PM
Problem: Routing Using Wild Cards - by El Forum - 12-15-2012, 10:57 PM
Problem: Routing Using Wild Cards - by El Forum - 12-16-2012, 12:27 AM
Problem: Routing Using Wild Cards - by El Forum - 12-16-2012, 12:36 AM
Problem: Routing Using Wild Cards - by El Forum - 12-16-2012, 01:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB