问题
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/
so that it points to http://<IP Address>/<virtualdir>
Im using IIS 10, windows server 2016.
What are my possible options?
回答1:
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
You can then give it bindings just like your base website with your desired DNS entry.
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
来源:https://stackoverflow.com/questions/49005921/how-do-i-map-iis-virtual-directory-to-a-subdomain