attributerouting - Forward slash in attribute routing regex -
i trying write regex matches route action. there seems problem forward slash.
this works:
[route("{url:regex((da|en))}")] www.mydomain.com/products/en [route("{url:regex((da|en)something)}")] www.mydomain.com/products/ensomething
this not:
[route("{url:regex((da|en)/something)}")] www.mydomain.com/products/en/something
it looks regex
lets match single segment of url, while presence of forward slash makes en/something
2 separate segments, i.e. en
, something
.
try attribute instead:
[route("{url:regex((da|en))}/something")]
Comments
Post a Comment