Recursos para Profesionales de TI > Página principal de foros > The Official Scripting Guys Forum! > W2003 add subdomain to existing website using classic asp
Formular una preguntaFormular una pregunta
 

RespondidaW2003 add subdomain to existing website using classic asp

  • jueves, 02 de julio de 2009 8:18mblokdijk Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    I need to add a subdomain to an existing webiste. It must be done in classic asp / vbscript.

    Adding a new webiste with hostheaders works, but for large numbers (+1000) i do not want each subdomain to actually be a site of its own in IIS, i just want to add a subdomain to an existing site in IIS. Any one got suggestions, this would greatly help me!

Respuestas

  • lunes, 06 de julio de 2009 4:15NickHunyady Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     Respondida
    I started reading more into your post and I think I was off.

    Is this what you are looking for?

    <%
    Set HTTPHost = Request.ServerVariables("HTTP_HOST")
    If HTTPHost = "domain1.com" then
    Response.Redirect ("http://www.domain1.com/domain1/index.asp")
    End If
    If HTTPHost = "domain2.com" then
    Response.Redirect ("http://www.domain2.com/domain2/index.asp")
    End If
    %>

Todas las respuestas