Bug 1262942 - Rewrite rule is not working in Jboss EAP 6.4.0 [NEEDINFO]
Rewrite rule is not working in Jboss EAP 6.4.0
Status: NEW
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: Portal (Show other bugs)
unspecified
All All
unspecified Severity medium
: ---
: ---
Assigned To: Default User
Tomas Kyjovsky
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-14 12:53 EDT by sudiptasarkar
Modified: 2016-06-22 13:51 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
aogburn: needinfo? (sudiptasarkar)


Attachments (Terms of Use)

  None (edit)
Description sudiptasarkar 2015-09-14 12:53:34 EDT
Description of problem:


Version-Release number of selected component (if applicable):

Jboss EAP 6.4.0


How reproducible:

The following reqrite rule works in Jboss 7.1.1-Final but doesn't work in Jboss EAP 6.4.0

<subsystem xmlns="urn:jboss:domain:web:2.2" default-virtual-server="default-host" native="false">
            <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
            <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>
            <virtual-server name="default-host" enable-welcome-root="false">
                <alias name="localhost"/>
                <alias name="example.com"/>
		<rewrite pattern="^/portal/(.*?)$" substitution="/core/$1" flags="R"/>
            </virtual-server>
        </subsystem>

Steps to Reproduce:
http://localhost:myport/portal/ returns 404

Actual results:

http://localhost:myport/portal/ returns 404

Expected results:

Redirect to http://localhost:myport/core/

Additional info:
Comment 2 Aaron Ogburn 2016-06-22 13:51:38 EDT
Do you have a / or /portal context deployed?  If not, the 404 would be expected because there is no context to serve the original portal request.  Thus the global rewrite valve would not be executed because a 404 is generated before the valve is reached.  See https://access.redhat.com/solutions/733363.

You should set enable-welcome-root="true", or deploy a ROOT.war or portal.war for the rewrite valve to be executed for that request.

Note You need to log in before you can comment on or make changes to this bug.