What is difference between these two paths?
http://www.mydomain.com/testmvc3
http://www.mydomain.com/testmvc3/
I put the code in HomeController:
// GET: /Home/
public ActionResult Index()
{
if (Request.IsAuthenticated)
{
return RedirectToAction("Index", "Member");
}
else
{
return View();
}
}
But only the second link works fine, but the first one still show the Home page.(even it is authenticated) How to make them have the same react?
You will want to leave the trailing slash off of a normal route, otherwise it indicates that there may be url parameters coming into the action.
To enforce this you might want to check out the cleanurl filter that is in MvcCms. Source Code