Bug 64461 - RewriteValve regression in 8.5.55
Summary: RewriteValve regression in 8.5.55
Status: RESOLVED DUPLICATE of bug 64432
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.5.x-trunk
Hardware: PC Linux
: P2 regression (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-20 13:02 UTC by apache-bugzilla=spam
Modified: 2020-05-20 13:07 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description apache-bugzilla=spam 2020-05-20 13:02:22 UTC
Hi,

I'm using the Harbottle packages for tomcat (tomcat8-8.5.55-1.el7.harbottle.x86_64
tomcat8-native-1.2.24-1.el7.harbottle.x86_64) on a CentOS 7 machine. I have a RewriteValve configured with something structurally identical to this:

===
RewriteCond	%{ENV:orig_REQUEST_URI}	^[^/].*
RewriteRule	(.*)	$1	[E=orig_REQUEST_URI:%{REQUEST_URI}]

RewriteRule	^/OldURI23(.*)	/NewerURIIsHere45$1
===

When accessing this directory (it is the docBase directory, and has an index.html as main page), a 404 page is returned that /NewerURIIsHere45/index.html is not found. Commenting out the last line, or the first two lines and restarting tomcat will make it work again. If the last line is changed to 

RewriteRule	^/OldURI23()(.*)	/NewerURIIsHere45$1$2

any access will throw an error that there is no group 2. Which suggests the wrong regexp match is consulted here.
Comment 1 apache-bugzilla=spam 2020-05-20 13:03:19 UTC
PS. The same configuration was previously used with version 8.5.54, which worked fine.
Comment 2 Mark Thomas 2020-05-20 13:07:56 UTC

*** This bug has been marked as a duplicate of bug 64432 ***