Resources for IT Professionals > Página Inicial dos Fóruns > The Official Scripting Guys Forum! > W2003 add subdomain to existing website using classic asp
Fazer uma PerguntaFazer uma Pergunta
 

PerguntaW2003 add subdomain to existing website using classic asp

  • quinta-feira, 2 de julho de 2009 8:18mblokdijk Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    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!

Todas as Respostas

  • segunda-feira, 6 de julho de 2009 1:43NickHunyady Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    I can help with this. Let me dig into my codebase and I will post something as soon as possible.

    Just to throw you something immediately, there is a script on all Server 2003 server's called IISVDir to automate virtual directory creations.

    Here is posting of mine showing vbscript call IISVDir.

    http://social.microsoft.com/Forums/en-US/ITCG/thread/d371a564-30cd-424c-bed4-045713a23be2

  • segunda-feira, 6 de julho de 2009 4:15NickHunyady Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    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
    %>