Details

    • Type: Bug Bug
    • Status: Resolved Resolved (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 7.0.1.Final
    • Fix Version/s: 7.1.0.Beta1
    • Component/s: Web
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      I have tried to add the following configuration to the standalone.xml <virtual-server> node:

      <virtual-server name="default-host">
      <alias name="localhost"/>
      <alias name="example.com"/>
      <rewrite pattern="^/helloworld(.*)" substitution="/helloworld/test.jsp"/>
      </virtual-server>

      and I have deployed the helloworld.war, however the rewrite does not work (I know I can deploy war at the root context I just want to test the rewrite).

        Activity

        Hide
        Carl L
        added a comment - - edited

        I actually tested 7.0.2 and basic rules without condition tags are working for me, such as

        <virtual-server name="default-host" enable-welcome-root="true">
            <alias name="localhost"/>
            <alias name="example.com"/>
            <rewrite pattern="^(.*)/([\w\-]+)$" substitution="$1/$2.jsp"/>
        </virtual-server>
        

        which I used to test the appending of .jsp. So it's useful to me even without the full 7.1.0 fix.

        Show
        Carl L
        added a comment - - edited I actually tested 7.0.2 and basic rules without condition tags are working for me, such as <virtual-server name= " default -host" enable-welcome-root= " true " > <alias name= "localhost" /> <alias name= "example.com" /> <rewrite pattern= "^(.*)/([\w\-]+)$" substitution= "$1/$2.jsp" /> </virtual-server> which I used to test the appending of .jsp. So it's useful to me even without the full 7.1.0 fix.
        Hide
        Markus Straub
        added a comment -

        I do not think that this bug is fixed completely:
        For me (using jboss-as-7.1.0.CR1b) rewrite patterns only work if enable-welcome-root is set to true!

        Show
        Markus Straub
        added a comment - I do not think that this bug is fixed completely: For me (using jboss-as-7.1.0.CR1b) rewrite patterns only work if enable-welcome-root is set to true!
        Hide
        Remy Maucherat
        added a comment -

        If the request does not match a webapp when it comes in, then processing stops there (before going into the rewrite valve, or any valve at all actually).

        Show
        Remy Maucherat
        added a comment - If the request does not match a webapp when it comes in, then processing stops there (before going into the rewrite valve, or any valve at all actually).
        Hide
        Carlos Go
        added a comment -

        Hello, I am using jboss EAP 6.x and I have configured the standalone.xml file as Carl L said with the helloworld.war attached and it does not work.

        Any other files to set? Any help?

        Many thanks in advance.

        Carlos.

        Show
        Carlos Go
        added a comment - Hello, I am using jboss EAP 6.x and I have configured the standalone.xml file as Carl L said with the helloworld.war attached and it does not work. Any other files to set? Any help? Many thanks in advance. Carlos.
        Hide
        Carl L
        added a comment - - edited

        Hi, Carlos. I've haven't tested in EAP but rewrite has been working fine for us with JBoss 7.1.1. We added flags="L" to our tag, but I'm not sure if that's significant in this case. Current rule:

        <rewrite pattern="^/(.*)/([\w\-]+)$" substitution="/$1/$2.jsp" flags="L"/>
        
        Show
        Carl L
        added a comment - - edited Hi, Carlos. I've haven't tested in EAP but rewrite has been working fine for us with JBoss 7.1.1. We added flags="L" to our tag, but I'm not sure if that's significant in this case. Current rule: <rewrite pattern= "^/(.*)/([\w\-]+)$" substitution= "/$1/$2.jsp" flags= "L" />

          People

          • Assignee:
            Remy Maucherat
            Reporter:
            jefimm
          • Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: