基本上,我环顾四周,找到了如何在IIS Express中创建域/子域.
它很容易找到,我所要做的就是在IIS Express的ApplicationHost.config中添加另一个绑定,并将我的hosts文件更改为127.0.0.1到域.
这是IIS express配置文件:
<binding protocol="http" bindingInformation="*:80:domain.com" /> <binding protocol="http" bindingInformation="*:80:sub.domain.com" />
但是,我找不到任何方法来创建一个包罗万象的URL.在某个地方可能有一个人的视线,我甚至尝试过(可能是天真的)*:80:*.domain.com和*:80:*.
我搜索但无法回答的另一个问题是将IIS表达式完全绑定到一个catch-all网址(例如,每个请求都应通过IIS Express传递给特定端口).
如果重要我正在使用ASP.NET MVC 3应用程序.
http://forums.iis.net/t/1095760.aspx
http://www.jb51.cc/article/p-okkxvflc-bub.html
Wildcard subdomains in IIS7. Is it possible to make them like it is in Apache?
以下article解释了IIS绑定的工作原理.关于你的第二个问题,文章指出:
The shortest possible binding is
reserved for servers with a single IP
and site,or if you wish to have a
“catch-all” site when no other binding
fits. This binding,which uses the IP
wildcard and no host header,would be
applied absolutely last when no other
binding match could be found. In this
case the binding will simply be:http *:80: