0 Replies Latest reply on Sep 17, 2013 9:03 AM by t_guerin

    URL rewriting in JBoss 7.2.0

    Newbie

      Hi,

       

      I'm trying to redirect to a given webApp depending on the host that makes the request.

      I modified the standalone.xml file:

      (...)

      <virtual-server name="default-host" enable-welcome-root="true">
      <alias name="localhost"/>
      <rewrite pattern="/" substitution="/myApp/redirect.jsp" flags="NC">
      <condition test="REMOTE_HOST" pattern="^host1.*" flags="OR"/>
      <condition test="REMOTE_HOST" pattern="^host2.*" flags="OR"/>
      </rewrite>
      </virtual-server>
      </subsystem>

      (...)

      It seems that the conditions are not taken into account: the redirect is always effective. I have tried with %{REMOTE_HOST}, but it doesn't work either.

      Am I doing something wrong?

       

      On a side note, the flags attributes are mandatory, which seems  a bit odd given that they're not when looking at http://docs.jboss.org/jbossweb/7.0.x/config/host.html

       

      Edit: I also tried with EAP 6.1, and I get the same behaviour.