IT 专业人士的资源 > 论坛主页 > 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日 8: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日 1: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日 4: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
    %>