>But - how do you tell it which virtual to go to? Do you just direct the DNS entry for "subdomain.domain.com" to the address "123.456.789/subdomain"?
I host several domains from the same IP address. Several have third level domains (subdomains). I have a hosting account with Intermedia (
www.intermedia.net) which allows up to 12 domains per account. Each domain may have sub-domains.
I set up my domains in the DNS and add subdomains as desired.
I have an asp script as my default document that directs the browser to the desired folder.
Looks like this for www .mydomain.com, admin.mydomain.com, and www .theirdomain.com.
If InStr( UCase(Request.ServerVariables("SERVER_NAME")), "ADMIN.MYDOMAIN.COM" ) > 0 Then
Response.Redirect("admin/index.htm")
ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("MYDOMAIN.COM") ) > 0 Then
Response.Redirect("index.htm")
ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("THEIRDOMAIN.COM") ) > 0 Then
Response.Redirect("/TDO/index.htm")
Else Response.Write("You have reached an unknown domain.")
End If
David.