Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 如何配置Wildfly以重写Anuglar应用程序的URL_Angular_Wildfly - Fatal编程技术网

Angular 如何配置Wildfly以重写Anuglar应用程序的URL

Angular 如何配置Wildfly以重写Anuglar应用程序的URL,angular,wildfly,Angular,Wildfly,我为我的angular应用程序提供了一个子目录,并在我的standalone.xml中发布了此配置的子目录 <host name="default-host" alias="localhost"> ... <location name="/app" handler="app" /> .. </host> <handlers>

我为我的angular应用程序提供了一个子目录,并在我的standalone.xml中发布了此配置的子目录

<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