Login
|
Webmail
|
Support
|
480-388-3777
Let's Chat
Infrastructure As A Service (IaaS)
Managed Hosting Overview
High Availability & Load Balancing
Data Storage
Disaster Recovery & Backup
All-In-One/DDOS Attack Protection
Security
Management Services
Email Solutions
Hosted / Encrypted Email
Enterprise / Encrypted Email
Partners Overview
Preferred Partners
Managed Hosting Overview
Managed Servers
Self-Managed Servers
Shared Website Hosting
Hosted / Encrypted Email
Domain Names
Company Overview
Leadership Team
Brinkster News
Careers
Data Center
Network
Legal
Corporate Social Responsibility
Contact Brinkster
Subdomains ASP.NET
Added By:
driveraide
Rated:
(2 of 5) by 3.
Thank you for rating this snippet.
Description:
The following code will allow you to redirect your web site for the subdomains you ask brinkster to give you. ASP.Net code This goes into your Defalut.aspx.vb page
Language:
Visual Basic Script
Save to web space
E-mail Link
Code Snippet:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim SrverName as string ServerName = Request.ServerVariables("SERVER_NAME") If SeverName <> yourwebsite.com then RedirectSubDomains(ServerName) End Sub Sub RedirectSubDomains(By Val ServerName as String) Dim Domain as String If servername = yourwebsite.sub1 then Domain = "subpage1.aspx Response.Redirect(Domain) End If If servername = yourwebsite.sub2 then Domain = "folder1/subpage2.aspx Response.Redirect(Domain) End If End Sub
Toll free:
1 (800) 345-7084