dannyvankooten/PHP-Router — Issue #3: Variable paths can override static paths
Author: Mnkras
Created: 2012-01-08 22:02:22+00:00
State: open

Ran into this today,

I was adding routes like so:

thing/:handle (just GET)
thing/update (GET and POST)

as you can see the one with the variable is there first,

I would request
thing/update
so when the router filters through the routes it hits thing/:handle and stops because it matches, the only way around this is to add thing/update before thing/:handle,

if there was a way to sort it by ones that do not have variables (static routes) that would be awesome