Resources for IT Professionals > 論壇首頁 > The Official Scripting Guys Forum! > W2003 add subdomain to existing website using classic asp
發問發問
 

問題W2003 add subdomain to existing website using classic asp

  • 2009年7月2日 上午 08:18mblokdijk 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    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!

所有回覆

  • 2009年7月6日 上午 01:43NickHunyady 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    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

  • 2009年7月6日 上午 04:15NickHunyady 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    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
    %>