The similar issue has been asked at below jboss developer forum:
I am upgrading from wildfly-16 to wildfly 18.0.1.Final and seeing the behavior change for request redirection for context root. For Widfly 16, any request http:/localhost:8080/myapp (myapp is context root) will be redirected to http:/localhost:8080/myapp/ (adding a forward slash at the end) but this behavior has been modified in Wildfly 18.0.1.Final. Instead of redirect status code (302), response is returning 200 status code. Is there any way to restore the old behavior that is redirecting request if forward slash is not available at end of url(for context root).