【发布时间】:2016-02-02 02:09:31
【问题描述】:
如果用户尝试访问无效的 url,有没有办法重定向到特定页面? 示例:如果用户尝试访问“http://localhost/InvalidControllerName”,则重定向到“http://localhost/Home”。
【问题讨论】:
-
可以指定自定义错误页面:benfoster.io/blog/aspnet-mvc-custom-error-pages
标签: c# .net asp.net-mvc