简体   繁体   English

同一URL /端口(IIS)上的多个应用程序

[英]Multiple applications on the same URL/Port (IIS)

I'm developing an ASP.Net MVC application in C#, and it is hosted in an IIS server. 我正在用C#开发ASP.Net MVC应用程序,并将其托管在IIS服务器中。 Right now the client asked me to have a CMS on the same app url, that will be used to serve the public pages. 现在,客户要求我在相同的应用程序URL上安装一个CMS,该CMS将用于提供公共页面。

I have looked for ASP.Net MVC CMS apps and could not find anything that would be easily integrated with the current application, so I choose to do it by changing the server configuration. 我一直在寻找ASP.Net MVC CMS应用程序,但找不到与当前应用程序轻松集成的任何内容,因此我选择通过更改服务器配置来实现。

What I need is: 我需要的是:

Custom App: 自定义应用:

  • exampleappurl.com/User exampleappurl.com/User

  • exampleappurl.com/Company exampleappurl.com/Company

  • etc 等等

CMS: CMS:

  • Any other URL, including "index" (exampleappurl.com) 任何其他URL,包括“索引”(exampleappurl.com)

Can I do it using any kind of Rewrite rule? 我可以使用任何一种重写规则吗? Or IIS configuration? 还是IIS配置? What is the best solution? 最好的解决方案是什么?

Thanks in advance! 提前致谢!

On IIS6, there is a feature called 'host headers', that does exactly this: several websites may share the port 80, and the request goes to one of the sites its URL points to. 在IIS6上,有一个名为“主机标头”的功能可以完全做到这一点:几个网站可能共享端口80,并且请求转到其URL指向的站点之一。

http://www.it-notebook.org/iis/article/understanding_host_headers.htm http://www.it-notebook.org/iis/article/understanding_host_headers.htm

http://technet.microsoft.com/en-us/library/cc753195(v=ws.10).aspx (this one is about IIS 7) http://technet.microsoft.com/zh-cn/library/cc753195(v = ws.10).aspx (这是有关IIS 7的)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM