在同一服务器中的不同别名中设置不同的文件夹

时间:2017-11-29 10:33:29

标签: windows server alias directory

在我的 Windows Server 2012 中,我设置了两个别名:

  1. http://kpi.xxx.yyy
  2. http://kpc.xxx.yyy
  3. 现在我需要在 IIS

    中的 inetpub / wwwroot 上的不同文件夹上关联别名
    1. http://kpi.xxx.yyy>>> 文件夹KPI ;
    2. http://kpc.xxx.yyy>>> 文件夹KPC
    3. 我在谷歌找不到成功。

      如何解决这个问题?

      你能帮助我吗?

      提前感谢您的帮助,非常感谢。

1 个答案:

答案 0 :(得分:1)

请在您的目录 inetpub / wwwroot 中尝试 Default.asp

<% 
Dim strProtocol
Dim strDomain
Dim strFullUrl

If lcase(Request.ServerVariables("HTTPS")) = "on" Then 
    strProtocol = "https" 
Else
    strProtocol = "http" 
End If

strDomain= Request.ServerVariables("SERVER_NAME")

strFullUrl = strProtocol & "://" & strDomain & "/"

If strFullUrl = "http://kpi.xxx.yyy/" then
   Response.Redirect("http://kpi.xxx.yyy/folder KPI/")
ElseIf strFullUrl = "http://kpc.xxx.yyy/" then
   Response.Redirect("http://kpc.xxx.yyy/folder KPC/")
End If

%>
相关问题