Reputation: 365
i have a website and i want to create an interface where a user can create his website on my host.it should be a sub domain for my domain. my Host is DiscountAsp.Net OR Godadday.i just read and they provide add-on with the name Unlimited Subdomain for this.They have code how to redirect here is the link http://support.discountasp.net/KB/a369/how-to-redirect-a-subdomain-to-a-subdirectory.aspx?KBSearchID=389848
Now is it possible in C#?how programitically i will create subdomains having a sample template in asp.net for all users?
Regards
Upvotes: 0
Views: 484
Reputation: 149
You can add this code in you CS file, in the Page_Load method
if (Request.ServerVariables["SERVER_NAME"] == "test.yourdomain.com")
Server.Transfer(@"~/Test/Default.html");
Do not forget to add the Test folder and mark it as an application from Web Application Tool
Upvotes: 0