【发布时间】:2023-03-18 12:48:01
【问题描述】:
我必须从以下 URL 传递用户请求:
site.com/events/2017/06/wwdc.html
或更常见的:
site.com/category1/subcategory1/subcategory2/...../subcategoryN/page-title.html
例如
site.com/cars/tesla/model-s/is-it-worth-it.html
通过Index(string title) 或类似的操作发送至ArticlesController。
在编译时我不知道我会有多少段。但我知道,URL 将以/{pageTitle}.html 结尾。主要问题是默认的asp.net核心路由不允许我写{*}/pageTitle.html
有可能吗?
【问题讨论】:
标签: asp.net asp.net-core asp.net-core-mvc asp.net-core-1.0 asp.net-core-routing