使用iis7 asp.net注册时为帐户创建子域

时间:2013-01-22 03:23:05

标签: asp.net iis-7 web-config subdomain wildcard-subdomain

我正在整天从Stackoverflow和google上挖掘3天。我没有得到任何确切的步骤,如何完成它...我在stackoverflow上阅读了所有这些问题,许多人问同样的问题而没有得到确切的步骤来执行此任务。

subdomain rewriting in ASP.NET?

https://serverfault.com/questions/58050/generating-content-based-on-subdomain

Creating subdomains on the fly

ASP.NET virtual subdomain via Rewrite

How to add a subdomain to an asp.net website?

How to allow users to create their own subdomains on my MVC website?

web.config rule for sub-directory to sub-domain redirection

Use Web.Config to redirect a directory to a subdomain

URL Rewrite for subdomains in ASP.Net

现在我正在尝试这样做:当用户在我的网站上注册时,那个时候创建​​一个像这样的用户名的子域

<用户名> .domain.com,如abc.domain.com,xyz.domain.com

并且必须指向domain.com/Users/<用户名&gt; /index.asp

这是一个很好的例子http://ytmnd.com/

我正在使用IIS7进行Windows托管,我使用的是asp.net。

当用户点击&lt;时,我在DNS中设置了通配符条目。 anyname&gt; .domain.com然后它指向服务器的默认Plesk网页;

我没有任何线索,它认为这样工作或它应该指向我的主domain.com

请提供完成此任务的步骤 谢谢

1 个答案:

答案 0 :(得分:4)

为什么不能使用自己链接中提供的答案?

How to allow users to create their own subdomains on my MVC website?

  

绑定DNS服务器和Microsoft DNS服务器都允许设置与域中任何不存在的条目匹配的通配符条目:

     

*。example.com。 3600 IN CNAME host1.example.com。   然后在IIS中设置URL重写规则,将http://subdomain.yourdomain.com/表单的URL转换为http://yourdomain.com/?root=subdomain

     

这将允许您使用数据库管理这些克隆的站点。

     

唯一的缺点是DNS系统不允许您设置www。* .youdomain.tld

形式的通配符条目
相关问题