Welcome Guest, Not a member yet? Register   Sign In
Problem with routes
#2

[eluser]pickupman[/eluser]
You can stack routes, meaning that you put them in a certain order. Routes work by going by first match found. Once a matching route is found, it will not look any further.

Given your example, you may want to use .htaccess to ignore the first segment. Any particular reason for wanting to always ignore the first segment?

How many controllers do you have that you need to be dynamic? Reason being say you have 5 controllers, it would take less code to hardcode the 5 controller routes than creating some loop or querying the DB for them.

Also be aware you may be creating a name collusion problem by always ignoring the first segment.


Messages In This Thread
Problem with routes - by El Forum - 02-26-2012, 12:58 PM
Problem with routes - by El Forum - 02-26-2012, 01:15 PM
Problem with routes - by El Forum - 02-26-2012, 02:13 PM
Problem with routes - by El Forum - 02-26-2012, 02:51 PM
Problem with routes - by El Forum - 02-26-2012, 09:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB