如何映射子域的子文件夹,而不在IIS中创建附加的网站? [英] How to map SubDomain to the subfolder without creating additional websites in IIS?

查看:164
本文介绍了如何映射子域的子文件夹,而不在IIS中创建附加的网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我使用的是BlogEngine.net为我的博客,我想创建5个不同的子域名,并指向不同的子文件夹(而不是重定向)。例如:

Hi I'm using a BlogEngine.net for my blog and I would like to create 5 different subdomains and point to different subfolders(not redirecting). For example:

firstsubdomain.domain.com - domain.com/posts/helloworld.aspx
firstsubdomain2.domain.com - domain.com/posts/helloworld2.aspx
firstsubdomain3.domain.com - domain.com/posts/helloworld3.aspx

感谢您提前工作的例子。我使用asp.net 3.5,C#,Windows Server 2008中,IIS 7

Thank you in advance for working example. I'm using asp.net 3.5, C#, Windows Server 2008, IIS 7

只是想确保在IIS中创建解决方案的其他网站不会为我工作。

Just want to make sure creating additional websites in IIS solution will not work for me.

推荐答案

在IIS中创建一个新的网站。在安装向导中,定义了主机头为你的子域名(firstsubdomain.com),设置相应使用的端口号和IP地址。在接下来的步骤中,选择你想成为该网站的根文件夹的文件夹。如果默认内容页会比标准的网页名称之一以外的东西(Default.aspx的,例如),那么你可以设置在网站上的文档选项卡。

In IIS, create a new website. In the setup wizard, define the host header as your subdomain name (firstsubdomain.com), set the port number and IP address to be used accordingly. In the next step, select the folder you want to be the root folder of the website. If the default content page is going to be something other than one of the standard page names (default.aspx, for instance) then you can set that in the Documents tab of the website.

这篇关于如何映射子域的子文件夹,而不在IIS中创建附加的网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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