我使用Angular(当前版本5)构建全栈应用程序,通常后端是
Windows Server
它使用
IIS
,因此我知道如何部署web。包含重写模块代码的配置文件。
问题是该站点是一个SPA,它需要始终指向索引。html,无论URL怎么说。。。
正如我所说,我习惯windows,但后端是Java
IBM Websphere
有人知道我需要做什么才能有一个正常工作的角度应用程序吗?
例如,WINDOWS的配置是web。配置如下,但这是带有Java应用程序的Websphere,我假设后端是
Linux/unix
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Angular Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/MyApp/" />
<!--<action type="Rewrite" url="/" />-->
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>