如何映射子域的子文件夹? [英] How to map SubDomain to the subfolder?
问题描述
你好,我使用的是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
推荐答案
您必须使用 URL重写如果不限IIS上,如果你有在IIS上的完全控制,然后可以用做 htaccess的:
You have to use URL rewriting if you limitation on IIS and if you have full control on IIS then can do using .htaccess:
检查这些链接了解详情:
Check these links for more details:
<一个href=\"http://stackoverflow.com/questions/4660717/web-config-and-mapping-subdomains-to-folders\">Web.config和子域映射到文件夹
的http://learn.iis.net/page.aspx/465/url-rewrite-module-configuration-reference/
的https://help.brinkster.com/KB/a125/how-do-i-redirect-a-domain-or-subdomain.aspx#b3
投资者关系联合会是一个ISAPI筛选器,做URL重写为IIS。它体积小,免费,而且易于使用。这是很容易安装,速度快,功能强大。你可以很容易地在IIS 6,7或7以上版本的搜索引擎友好(SEF)或搜索引擎优化(SEO)的URL。它可以与你所拥有的,而且也可以让你去帮助。你可以得到源$ C $ C,检查它,甚至亲自对其进行修改。
IIRF is an ISAPI filter that does URL Rewriting for IIS. It's small, FREE, and easy to use. It is easy to install, fast, and powerful. You can get Search-Engine Friendly (SEF) or Search-Engine Optimized (SEO) URLs easily on IIS 6, 7, or 7+. It works with what you have, and there's help available to get you going. You can get the source code to inspect it or even modify it yourself.
这篇关于如何映射子域的子文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!