【发布时间】:2020-01-02 12:59:25
【问题描述】:
我已经在子系统标签中以这种方式配置了standalone.xml文件:
<rewrite name="rule-2" pattern="^((?!.*(rest)).*)\/([\w\-]+)\/([\w\-]+)$" substitution="/$1/index.html" flags="L"/>
<rewrite name="rule-3" pattern="^((?!.*(rest)).*)\/([\w\-]+)$" substitution="/$1/index.html" flags="L"/>
我应该将所有 url 重定向到索引,让包含“rest”一词的那些通过,我认为这些正则表达式必须工作,但我得到一个空白页面来刷新而没有错误。 我已经像这样设置了base-href:/myApp/
使用这两种正则表达式替代方案:
rewrite name="rule-1" pattern="^/(.*)/([\w\-]+)/([\w\-]+)$" substitution="/$1/index.html" flags="L"/>
<rewrite name="rule-2" pattern="^/(.*)/([\w\-]+)$" substitution="/$1/index.html" flags="L"/>
一切正常,但所有包含“rest”一词的 URL 也会被重定向,因此后端调用不起作用
【问题讨论】:
标签: angular jboss angular6 jboss6.x