IIS网站与虚拟目录 - 为什么一个或另一个? [英] IIS Web Sites versus Virtual Directories - why one or the other?
问题描述
虽然我已经同时使用过两者,但我从来没有真正得到决定或利弊是否选择网站作为新应用的根实体,或现有网络下的虚拟目录现场。我有一个模糊的想法,主要涉及好吧,它是一个需要自己的配置的主站点的子位置吗?,但我不确定这是完全准确的。我有应用程序池,但从来没有理解这种差异。
Though I've used both, I never really "got" the decisions or pros/cons that go into whether or not to choose a web site as the root entity of a new app, or a virtual directory underneath an existing web site. I have a vague idea, mostly involving "well, is it a sublocation of a master site that needs its own configuration?," but I'm not sure that's entirely accurate. I have application pools down pat, but never understood this difference.
所以,问题。 IIS中的网站和虚拟目录之间的区别是什么?为什么选择其中一个?
推荐答案
一个区别是您可以将不同的网站分配给不同的URL。这允许您使用:
One difference is that you can assign different Web Sites to different URLs. This allows you to use:
app1.mydomain.com
app2.mydomain.com
app1.mydomain.com
app2.mydomain.com
而不是:
mydomain.com/app1
mydomain.com/app2
mydomain.com/app1
mydomain.com/app2
大多数人认为这是清洁工。
Which is considered by most people "Cleaner".
这篇关于IIS网站与虚拟目录 - 为什么一个或另一个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!