MVC如何路由aspx

时间:2017-07-31 12:58:12

标签: c# asp.net asp.net-mvc

您好,对于电子商务替换项目,我必须将所有旧网址路由到新网址(大约30.000个链接)。 我使用占位符来尝试此解决方案After add MapPageRoute to an asp.net mvc project, the site stops to enter in Home Controller来标准化网址

routes.MapPageRoute(
            "LegacyShop",
            "Error/_404",
            "~/it-www/{page}.aspx",
            true, null,
            new RouteValueDictionary { { "outgoing", new MyCustomConstaint() } }
        );

"错误/ _404" controller / action是一种示例方法,它根据表格为新URL创建301。 但是它没有用,每次我尝试都有一个简单的404错误。 有人能帮我吗? 非常感谢

0 个答案:

没有答案