Bug 1262942 - Rewrite rule is not working in Jboss EAP 6.4.0
Summary: Rewrite rule is not working in Jboss EAP 6.4.0
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: Portal
Version: unspecified
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact: Tomas Kyjovsky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-14 16:53 UTC by sudiptasarkar
Modified: 2023-09-14 03:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-26 11:49:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description sudiptasarkar 2015-09-14 16:53:34 UTC
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 17:51:38 UTC
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.

Comment 4 Red Hat Bugzilla 2023-09-14 03:05:16 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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