为在iis7 asp.net上注册的帐户创建SubDomain [英] Creating SubDomain for an account on registration with iis7 asp.net
问题描述
我从Stackoverflow和Google的3天开始进行挖掘.我没有任何确切的步骤,如何实现它.我在stackoverflow上阅读了所有这些问题,很多人问了同样的问题,而没有确切的步骤来完成此任务.
> https://serverfault.com/questions/58050/generating-content-based-on -subdomain
现在我正在尝试做的是:当用户在我的网站上注册时,那个时候创建一个具有这样用户名的子域
<用户名> .domain.com,例如abc.domain.com,xyz.domain.com
,并且必须指向domain.com/Users/<用户名>/index.asp
这是一个很好的例子 http://ytmnd.com/
我正在将Windows托管与IIS7一起使用,并且我正在使用asp.net.
当用户点击<时,我在DNS中设置了通配符条目. anyname> .domain.com然后指向服务器的默认Plesk网页;
我不知道该如何工作,或者应该指向我的主要domain.com
请向我提供完成此任务的步骤 谢谢
您为什么不能使用自己的链接中提供的答案?
http://subdomain.yourdomain.com/放入 http://yourdomain.com/?root=subdomain
这将允许您使用数据库来管理这些克隆的站点.
唯一的缺点是DNS系统不允许您设置格式为www.*.yourdomain.tld的通配符条目
I am digging from 3 days all over the Stackoverflow and google. I am not getting any exact steps, how to accomplish it... I read all these questions on stackoverflow, many person asked this same question and not got exact Steps to do this Task.
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
Now this is i am trying to do: When user register on my website, that time create a subdomain with user name like this
< username >.domain.com like abc.domain.com, xyz.domain.com
and It must points to domain.com/Users/< username >/index.asp
This is a good example http://ytmnd.com/
I am using Windows hosting with IIS7 and i am using asp.net.
I set the Wildcard entry in DNS, when user hit < anyname >.domain.com then it pointing to default Plesk webpage of server;
I dnt have any clue it suppose to work like that or it should point to my main domain.com
Please Provide me steps to complete this task Thanks
Why can't you use the answer provided in your own link?
How to allow users to create their own subdomains on my MVC website?
The bind DNS server and Microsoft DNS server both allow to setup a wildcard entry that match any nonexisting entry in the domain:
*.example.com. 3600 IN CNAME host1.example.com. Then you setup an URL rewrite rule in the IIS that turns the URL of the form http://subdomain.yourdomain.com/ into, say, http://yourdomain.com/?root=subdomain
This will allow you to manage these cloned sites using a database.
The only drawback is that DNS system does not allow you to setup a wildcard entry of the form www.*.yourdomain.tld
这篇关于为在iis7 asp.net上注册的帐户创建SubDomain的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!