在IIS中配置Web应用程序以从特定基URL提供服务

bnl4lu3b  于 12个月前  发布在  其他
关注(0)|答案(1)|浏览(122)

我有一个Angular应用程序托管在IIS站点的目录结构中,具体来说,在这个路径中:mainSite/client/v3
目前,要访问客户端应用程序,我需要使用URL:https://mainSite/client/v3
但是,我想配置Angular应用程序,使其从基本URL运行:https://mainSite
如何实现此配置?正确设置Angular应用程序,以便从所需的基础URL访问Angular应用程序需要哪些步骤

shyt4zoc

shyt4zoc1#

你可以使用url rewrite将https://mainSite/client/v3重定向到https://mainSite,这个demo你可以作为参考:

<rewrite>
   <rules>  
     <rule name="test" enabled="true" stopProcessing="true">
        <match url="client/v3" />            
        <action type="Redirect" url="https://mainSite" />
      </rule>
    </rules>
</rewrite>

相关问题