2 Replies Latest reply on Nov 24, 2019 10:45 AM by Prithviraj Patil

    Redirect to full domain name in standalone.xml

    Brian Parker Newbie

      I have a WildFly application running in standalone mode. I used to use http but are now using using https.   I have the redirect from http to https  working using

       

           <http-listener name="default" socket-binding="http"  redirect-socket="https">

       

      in standalone.xml and the following in web.xml

       

           <security-constraint>

                <web-resource-collection>

                     <web-resource-name>war_name</web-resource-name>

                     <url-pattern>/*</url-pattern>

                </web-resource-collection>

                <user-data-constraint>

                     <transport-guarantee>CONFIDENTIAL</transport-guarantee>

                </user-data-constraint>

           </security-constraint>

       

      However, the certificate is for *.domain.com so I want to redirect requests for https://servername:8443/war_name to https://servername.domain.com:8443/war_name

       

      What do I need to add to standalone.xml to perform the above redirect?

       

      Do I also need to add somethign to the web.xml file?