Angular 如何配置Wildfly以重写Anuglar应用程序的URL
我为我的angular应用程序提供了一个子目录,并在我的standalone.xml中发布了此配置的子目录Angular 如何配置Wildfly以重写Anuglar应用程序的URL,angular,wildfly,Angular,Wildfly,我为我的angular应用程序提供了一个子目录,并在我的standalone.xml中发布了此配置的子目录 <host name="default-host" alias="localhost"> ... <location name="/app" handler="app" /> .. </host> <handlers>
<host name="default-host" alias="localhost">
...
<location name="/app" handler="app" />
..
</host>
<handlers>
<...
<file name="app" path="${jboss.home.dir}/../app"/>
最后我用grunt构建了一场战争,然后添加了一个undertow-handlers.conf最后我用grunt构建了一场战争,然后添加了一个undertow-handlers.conf
RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# If the requested resource doesn't exist, use index.html
RewriteRule ^ /index.html