我从3天开始遍历Stackoverflow和谷歌。我没有得到任何确切的步骤,如何完成它...我阅读了所有这些问题在stackoverflow,许多人问这个问题,并没有得到确切的步骤来做这个任务。在iis7 asp.net上注册时创建一个帐户的子域
subdomain rewriting in ASP.NET?
https://serverfault.com/questions/58050/generating-content-based-on-subdomain
Creating subdomains on the fly
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 like abc.domain.com,xyz.domain.com
它必须指向d omain.com/Users/ <用户名> /index.asp
这是一个很好的例子http://ytmnd.com/
我使用Windows与IIS7托管和我使用asp.net。
我在DNS中设置通配符条目,当用户点击< anyname> .domain.com时,它指向默认的Plesk服务器网页;
我天玑有它假设这样的工作任何线索或将其应指向我的主要domain.com
请给我提供的步骤为什么不能使用来完成这个任务 感谢
谢谢你的回复,我试了一下,但在第二步后卡住了。它说:“那么你在IIS中设置一个URL重写规则,将URL变成形式.......”因为我使用托管公司的共享主机,所以我没有直接访问IIS的权限。那么如何实现这一步? –
戴维斯,我得到了一些改进,现在当我输入 .mydomain.com然后它将它指向mydomain.com。现在没有下一个线索该怎么做,所以它将直接指向用户文件夹,例如。 user1.mydomain.com to mydomain.com/users/user1/index.aspx –
发布您正在使用的代码以使其现在重定向。 – davids