ASP.NET MVC url匹配及路由参考
routes.MapRoute(
"NotFound",
"{shortid:regex(^\\w{{8}}$)}",
new { controller = "Home", action = "Detail" });
//匹配类似/xxxxxxxx这样的路径,返回/home/detail的内容
public async Task<IActionResult> Detail(string id)
{
var shrotid = this.RouteData.Values["shortid"]?.ToString();
...
return View();
}