主机相同的ASP.NET MVC应用程序多个域? [英] Host Multiple Domains with the same ASP.NET MVC app?

查看:199
本文介绍了主机相同的ASP.NET MVC应用程序多个域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要托管多个网站(所有不同的领域 - 不是子域)使用相同的ASP.NET MVC应用程序。我需要的应用程序来关闭域根据不同的行为,但我还是想在相同的应用程序服务的所有领域。我不想域名转发或重定向,我actully希望所有的域可以对自己的工作,但担任了同样的MVC应用程序中。我该怎么做呢?这也是值得注意的是,我在与GoDaddy共同主​​办。

I want to host multiple web sites (all with different domains - not sub domains) with the same ASP.NET MVC app. I need the app to act differently based off the domain, but I still want the same app to serve all domains. I don't want domain forwarding or redirection, I actully want all the domains to function on their own, but served out of the same MVC app. How do I do this? It is also worth noting that I am in shared hosting with GoDaddy.

在此先感谢!

推荐答案

这应该是可能使用的主机头字段中的绑定设置IIS。只要你想为你的应用程序可以添加多个不同的主机头。而只要该域以某种方式转到该主机特定的端口(HTTP或HTTPS或自定义),则该应用程序将被使用。

This should be possible with IIS using the host headers field in the bindings settings. You can add as many different host headers as you want for your application. And as long as that domain somehow goes to that host on that particular port (http or https or custom), then that application will be used.

这篇关于主机相同的ASP.NET MVC应用程序多个域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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