簡體   English   中英

如何為URL重寫Anuglar應用程序配置Wildfly

[英]How do I configure Wildfly for URL Rewriting an Anuglar application

我為我的角度應用程序提供了一個子目錄,並在standalone.xml中使用此配置發布了該子目錄

<host name="default-host" alias="localhost">
                ...
                <location name="/app" handler="app" />
                ..
            </host>


<handlers>
            <...
            <file name="app" path="${jboss.home.dir}/../app"/>

...

所以現在我必須知道如果我想對我的路線使用直接鏈接,我該如何將其重定向到index.html。

對於Apache,它看起來像這樣

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

最后,我與咕unt聲打了一場戰爭,然后添加了一個undertow-handlers.conf

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM