IIS将新子域指向现有虚拟目录 [英] IIS Point new subdomain to existing virtual directory

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

问题描述

所以目前我的网站可以通过访问http://hostname/myvirtualdirectory/home.aspx 如果你去 http:// hostname / myvirtualdirectory 它会自动转到home.aspx ...好!

So Currently I have a site accessible by http://hostname/myvirtualdirectory/home.aspx If you go to http://hostname/myvirtualdirectory it automatically goes to home.aspx... good!

但是当我转到 http:// hostname 时,它会给出IIS启动页面。

However when I go to http://hostname it gives the IIS start page.

问题1:
如何将此重定向到虚拟目录 myvirtualdirectory / home.aspx

我已经在服务器上指出了一个subomdain mysubdomain.myurl.com ,如果我有一切工作原理基本相同转到 http://mysubdomain.mysite.com/ 我得到了起始页,但直接转到 http://mysubdomain.mysite.com/ myvirtualdirectory 确实转到home.aspx页面

I have pointed a subomdain mysubdomain.myurl.com at the server, everything works pretty much the same if I go to http://mysubdomain.mysite.com/ I get the start page but going directly to http://mysubdomain.mysite.com/myvirtualdirectory does go to the home.aspx page

问题2
一旦我在问题1的答案中正确指出了一切我做了吗需要做额外的事情来处理子域吗?

Question 2 Once I point everything correctly in the answer to question 1 do I need to do anything extra to handle the subdomain?

谢谢!

推荐答案

我假设您使用的是IIS 7.0或更高版本。

I'm going to assume you're using IIS 7.0 or above.

回答问题1)
确保安装了 HTTP重定向功能,然后设置root网站上的redirct,详情请点击此处: http://www.iis.net/configreference/ system.webserver / httpredirect

Answer to question 1) Ensure you have the HTTP Redirection feature installed, and then setup a redirct on the root website, details here: http://www.iis.net/configreference/system.webserver/httpredirect

回答问题2)
你不需要做任何额外的事情来处理子域名,除非你'我在服务器上设置了多个网站,从你的问题我猜不是这样的。

Answer to question 2) You don't need to do anything extra to handle the sub domain unless you've set up multiple websites on the server, from your question I'm guessing that's not the case.

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

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