這兩條路徑有什麼區別?MVC3 uri帶或不帶「/」顯示不同的響應
http://www.mydomain.com/testmvc3
http://www.mydomain.com/testmvc3/
我把HomeController中的代碼:
// GET: /Home/
public ActionResult Index()
{
if (Request.IsAuthenticated)
{
return RedirectToAction("Index", "Member");
}
else
{
return View();
}
}
但只有第二個鏈接工作正常,但第一個仍然顯示主頁(即使它被驗證)如何讓他們有同樣的反應?
MvcCmsJon,感謝您的回覆。你是對的,用你的代碼,網址顯然會清楚。 – Feng 2011-06-07 14:04:20