【发布时间】:2021-11-07 22:05:47
【问题描述】:
我正在开发一个 ASP.NET Core 5 MVC 项目。我的客户想要不同的链接格式,例如:
http://studentfintech.app/short_form
但是,此时的页面链接是:
http://studentfintech.app/Money/short_form
如果我删除 MoneyController,它将被删除,但如果没有控制器,则无法访问。
请分享您的想法以根据此链接访问此页面:
http://studentfintech.app/short_form
【问题讨论】:
-
docs.microsoft.com/en-us/aspnet/core/fundamentals/… 重写 URL 已经是 ASP.NET Core 的一部分。但是您在上面混合了很多属于旧版 ASP.NET 的标签,那么您确定您实际使用的框架是什么?
标签: asp.net-core asp.net-core-mvc asp.net-core-routing