I think I am trying to get too much from routes in...
# fw1
d
I think I am trying to get too much from routes in fw/1. Can routes handle multiple parameters? For example:
Copy code
routes = [
    { "/{region:(north|east|midlands|london|southeast|southwest|moreregions)}/?$" = "/home/region/region/:region" }
]
works as expected so
/southeast
routes to home/region/region/southeast and runs the home.region controller passing region=southeast. Now this route doesn’t seem to work:
Copy code
routes = [
    { "/{region:(north|east|midlands|london|southeast|southwest|moreregions)}/{area:([A-Za-z0-9-_]+)}/?$" = "/home/area/region/:region/area/:area" }
]
This should handle
/southeast/oxfordshire
and route to home.area controller passing both region=southeast and area=oxfordshire If I hit the url
/home/area/region/southeast/area/oxfordshire
the correct page loads but
/southeast/oxfordshire
fails. Here’s my full routes array:
Copy code
routes = [
	{ "/about/?$" = "/home/about" },
	{ "/search/?$" = "/home/search" },
	{ "/locations?/?$" = "/home/areas" },
	{ "/{region:(north|east|midlands|london|southeast|southwest|moreregions)}/{area:([A-Za-z0-9-_]+)}/?$" = "/home/area/region/:region/area/:area",
	{ "/{region:(north|east|midlands|london|southeast|southwest|moreregions)}/?$" = "/home/region/region/:region" } }
]
Any ideas?