如何将IIS虚拟目录映射到子域? [英] How do I map IIS virtual directory to a subdomain?

查看:116
本文介绍了如何将IIS虚拟目录映射到子域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我的网站映射如下

Currently, I have a website mapping as following

http://subdomain.domain.com/<virtualdir> to http://<IP Address>/<virtualdir> 

我希望仅通过子域访问虚拟目录:

I want the virtual directory to be accessed with just the subdomain:

http://subdomain.domain.com/ 

,使其指向http://<IP Address>/<virtualdir>

我正在使用IIS 10,Windows Server 2016.

Im using IIS 10, windows server 2016.

我可能有哪些选择?

推荐答案

如果我正确理解了您的问题,则需要 http: //subdomain.domain.com/可以通过纯URL http://subdomain.domain.com进行访问. 如果是这种情况,您想进入IIS: 1.选择 2.右键 3.转换为应用程序

If I understand your question correctly you want http://subdomain.domain.com/ to be accessible by the plain URL http://subdomain.domain.com. If that is the case you want to go into your IIS: 1. select 2. right click 3. convert to application

然后,您可以像其基本网站一样为它提供绑定,并带有所需的DNS条目.

You can then give it bindings just like your base website with your desired DNS entry.

旁注;然后,您可以从所需的基础站点上删除绑定,也可以为其提供相同的地址 http://subdomain .domain.com ,但其他端口为 http://subdomain.domain.com: 8080 访问和 http://subdomain.domain.com 以获取原始内容.基础站点

Side note; You can then either remove your binding from the base site that you want on the or give it the same address of http://subdomain.domain.com but some other port so it would be http://subdomain.domain.com:8080 to access the and http://subdomain.domain.com for the original content at the base site

这篇关于如何将IIS虚拟目录映射到子域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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