0

How to redirect root path to subpath?

e.g. http://test.com:9090/ -> http://test.com:9090/portal/

tony
  • 91
  • 1
  • 8

2 Answers2

1

In the newer version Wildfly, we can used rewrite in undertow:

<filter-ref name="root-redirect" predicate='regex(pattern="^/$", value="%U", full-match=true)' />

<rewrite name="root-redirect" redirect="true" target="/xxx" />
tony
  • 91
  • 1
  • 8
-1

If you only need redirect rather than rewrite, you can create ROOT.war and have have single index page with redirect

Will Tatam
  • 566
  • 3
  • 10