Converting router from matching regexp to just matching path prefixes.