I have a CMS that stores the URL of a "page" in the database. The page has a reference to a template, which is just a regular aspx file. Using URL rewriting the request is sent to the correct aspx file.
我们得到多国旅的支持几乎已经完成,但有一个问题。 m形形形形形形形形色色色,它期望着尿中的控制器名(即,我知道,你可以在没有控制器名的情况下为尿液设置一个违约控制器,但所有网页都有不同的控制器),因此难以支持 following状。
www.domain.com/pagename
For example:
www.cnn.com/about-this-site
www.cnn.com/press-release-new-ceo-announced
页面名称与控制器或观点/行动无关,只是一个方便使用的网页名称。
So basically what we would like to do is to take the pagename, find the correct page our system, find the referenced template(controller in mvc) and set up manual routing for that controller and action. Any ideas on how to do that? Or should be just accept that URL s in mvc needs the controller name in most cases?