2011-05-04 27 views

回答

0

你可以嘗試這樣的事:

public ActionResult Home() { 
    Response.Status = "301 Moved Permanently"; 
    Response.RedirectLocation = "/"; 
    Response.End(); 
    return Redirect("~/"); 
} 

這適用於一次性的。如果你有多個,那麼你會想出一些處理程序。

我用過的一個這樣的處理程序是Legacy Routing。它爲我工作得很好。

+0

是的,我有很多倍數。 :( – Dkong 2011-05-04 04:47:11

+0

嘗試「傳統路由」 - 我剛剛發佈了一個鏈接。 – 2011-05-04 04:54:45

+0

是可靠的示例嗎?是否易於實現? – Dkong 2011-05-04 05:10:52