MVC 3域路由 [英] MVC 3 Domain Routing

查看:184
本文介绍了MVC 3域路由的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如果下面是可能的。我有一个名为www.myweb.com网站。这个网站可以说球队的目录。球队的名单可以在这里找到。

I would like to know if the following is possible. I have a website called www.myweb.com. This website could be a directory of say football teams. The list of teams could be found here

www.myweb.com/home/teamlist

在选择一队人会采取

www.myweb.com/teams/teama or
www.myweb.com/teams/teamb etc

团队区域下的内容将涉及到它们例如

the content under the teams area would be related to them e.g.

www.myweb.com/teams/teama/fixtures
www.myweb.com/teams/teama/news

我有以上工作,但想知道是否甚至远程可能对仍然使用当前的模型,视图和控制器每个队一个单独的网站例如。

i have the above working but would like to know if it is even remotely possible to have a separate website for each team which still uses the current models, views and controllers e.g.

www.teama.com

会去从

www.myweb.com/teams/teama

其中团队是控制器和'teama'是一个'细节'动作的参数。还做

where 'teams' is the controller and 'teama' is a parameter for a 'details' action. Also doing

www.teama.com/fixtures 
www.teama.com/news

将显示相同的东西,

would display the same stuff as

www.myweb.com/teams/teama/fixtures
www.myweb.com/teams/teama/news

许多感谢,并希望我措辞确定。

many thanks and hope i have worded it ok.

鲁迪

推荐答案

有一个在MVC域路由,我还在研究它自己,因为我有一个要求作为自己的类似,但我认为应该做你所需要的。

Have a look at MVC Domain Routing, I'm still researching it myself as I have a similar required as yourself but I think that should do what you need.

以下链接可能是很方便的:

The following links might be handy:

ASP.Net MVC域路由

博尔特在ASP.Net MVC的第一部分多租户(链接到第二部分是在页面上)

这篇关于MVC 3域路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆