我用 MVC 开发了一个网站,但我对地址栏中的链接地址如何显示有一点问题。当我打开网站时,我必须先登录;登录账号后,首页出现了,但是在浏览器地址栏还是有
http://localhost:1413/Account/LogOn
代替
http://localhost:1413/Home
另外,注销后,我被重定向到登录页面,但在地址栏中出现
http://localhost:1413/Account/LogOn 
我想只是
http://localhost:1413/Account/LogOff
我的 Global.asx 代码
 public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
        routes.MapRoute(
            "Default", // Route name
            "{controller}/{action}/{id}", // URL with parameters
            new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
        );           
    }
我使用了这种类型的重定向,但结果是一样的:
public ActionResult LogOn()
    {
        if (HttpContext.User.Identity.IsAuthenticated == true)
        {
            return RedirectToAction("Index", "Home");
        }
        return View();
    }