Welcome Guest, Not a member yet? Register   Sign In
Help with a simple route
#4

[eluser]CroNiX[/eluser]
More specific routes need to come before less specific.

Your first route has 2 segments. Your second route has 3 segments. The one with 3 segments should come before the one with 2 segments since they use the same 'offers' controller.

Routes will stop being processed as soon as there is a match found, and they are processed from top to bottom. The route segments are NOT "required", meaning if you have a route with 3 segments, like your 2nd example, and the url was 'http://yoursite.com/offers/something/something_else', it would match your first route as well as your 2nd route, so it will go with the first. That's why the more specific routes need to come first, so they will get matched first.


Messages In This Thread
Help with a simple route - by El Forum - 06-21-2012, 04:36 AM
Help with a simple route - by El Forum - 06-21-2012, 04:38 AM
Help with a simple route - by El Forum - 06-21-2012, 05:42 AM
Help with a simple route - by El Forum - 06-21-2012, 10:06 AM
Help with a simple route - by El Forum - 06-21-2012, 11:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB