davla
06/22/2022, 6:22 PMroutes = [
{ "/{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:
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:
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?