rewritevalve

2020-07-10 Thread Jake Orel
Hi all, My name is Jake. I'm a newbie to tomcat and I'm working on setting up the rewrite valve. I've configured it host specific rather than global. I have put my rewrite.config file inside of my Catalina base for the host name and I know I'm reading the file at the very least because if i fill it

Re: RewriteValve does not work on HTTPS

2020-02-14 Thread Hua Zhang
Thank you for the information and fix, Mark. On Fri, Feb 7, 2020 at 12:31 AM Mark Thomas wrote: > On 06/02/2020 23:00, Mark Thomas wrote: > > The issue appears to be that the following RewriteCond does not match > > when the request is served over HTTP/2 (with TLS) but it does if the > > request

Re: RewriteValve does not work on HTTPS

2020-02-06 Thread Mark Thomas
> Mark > > > > On 06/02/2020 20:42, Pierre Chiu wrote: >> I just want to concur I have the same issue. >> Removing that one line upgradeprotocol >> and rewrite works again. >> >> >> >> On Thu, Feb 6, 2020 at 3:28 PM Hua Zhang wrote: >>

Re: RewriteValve does not work on HTTPS

2020-02-06 Thread Mark Thomas
t; Removing that one line upgradeprotocol > and rewrite works again. > > > > On Thu, Feb 6, 2020 at 3:28 PM Hua Zhang wrote: > >> Nope, I also tested it with NIO instead of APR, same issues happen. >> RewriteValve does not function as expected. Besides it, there a

Re: RewriteValve does not work on HTTPS

2020-02-06 Thread Pierre Chiu
I just want to concur I have the same issue. Removing that one line upgradeprotocol and rewrite works again. On Thu, Feb 6, 2020 at 3:28 PM Hua Zhang wrote: > Nope, I also tested it with NIO instead of APR, same issues happen. > RewriteValve does not function as expected. Besides it,

Re: RewriteValve does not work on HTTPS

2020-02-06 Thread Hua Zhang
Nope, I also tested it with NIO instead of APR, same issues happen. RewriteValve does not function as expected. Besides it, there are also two https-443-exec executed by one request. There is definitely something wrong with Http2Protocol. And it results in this case a problem in RewriteValve

Re: RewriteValve does not work on HTTPS

2020-02-06 Thread Rémy Maucherat
I observe now at least two > weird situations. > > 1) As mentioned before, RewriteValve does not work as expected. > 2) Besides it, I observed that serviet behaviors weird. According to the > log file it seems that a servlet is sometimes called *twice by one > request*. > &

Re: RewriteValve does not work on HTTPS

2020-02-06 Thread Hua Zhang
Thank you for the response. I am finally able to confirm the issue. When I put the following line in comment, everything works fine. I mean as expected. ** If the above line UpgradeProtocol is activated, I observe now at least two weird situations. 1) As mentioned before, RewriteValve does

Re: RewriteValve does not work on HTTPS

2020-02-05 Thread Felix Schumacher
ue I found by using RewriteValve > on tomcat 9.30 > > The rewrite.config is very simple: > > /RewriteCond %{HTTP_HOST} =youkoop.com <http://youkoop.com> > RewriteRule ^.*$ https://www.youkoop.com [R=301,L] > / > > All I want is just redirect a naked root domain to a www do

Re: RewriteValve does not work on HTTPS

2020-02-04 Thread Hua Zhang
gt; > > > Hereby I have a question about an issue I found by using RewriteValve > > on tomcat 9.30 > > > > The rewrite.config is very simple: > > > > /RewriteCond %{HTTP_HOST} =youkoop.com <http://youkoop.com> > > RewriteRule ^.*$ https://www.youkoop.com

Re: RewriteValve does not work on HTTPS

2020-02-04 Thread Olaf Kock
On 04.02.20 20:31, Hua Zhang wrote: > Best tomcat team, > > Hereby I have a question about an issue I found by using RewriteValve > on tomcat 9.30 > > The rewrite.config is very simple: > > /RewriteCond %{HTTP_HOST} =youkoop.com <http://youkoop.com> > RewriteRul

RewriteValve does not work on HTTPS

2020-02-04 Thread Hua Zhang
Best tomcat team, Hereby I have a question about an issue I found by using RewriteValve on tomcat 9.30 The rewrite.config is very simple: *RewriteCond %{HTTP_HOST} =youkoop.com <http://youkoop.com>RewriteRule ^.*$ https://www.youkoop.com <https://www.youkoop.com> [R=301,L]* A

Re: Path parameters with RewriteValve

2019-09-19 Thread Mark Thomas
in our solution, there is an > nginx proxy in front of tomcat that replace all semicolon of the url > with an unique sequence of character and in the RewriteValve there is > the opposite operation). That is as good as anything I can come up with off the top of my head. > About all the

Re: Path parameters with RewriteValve

2019-09-17 Thread Alain Sellerin
On Mon, Sep 16, 2019 at 1:49 PM Mark Thomas wrote: > > > Alain, > > On 9/13/19 13:37, Alain Sellerin wrote: > >>>> Tomcat version: 8.5 OS: Win10, Linux > > > > >>>> I'm facing an issue with an application that is using path > >&g

Re: Path parameters with RewriteValve

2019-09-16 Thread Mark Thomas
> Alain, > On 9/13/19 13:37, Alain Sellerin wrote: >>>> Tomcat version: 8.5 OS: Win10, Linux >>>> I'm facing an issue with an application that is using path >>>> parameters in conjunction with a RewriteValve. >>>> If the request

Re: Path parameters with RewriteValve

2019-09-14 Thread Alain Sellerin
m facing an issue with an application that is using path > > parameters in conjunction with a RewriteValve. > > > > I narrowed down the problem by using the sample application > > available here: > > https://tomcat.apache.org/tomcat-8.5-doc/appdev/sample/ > > > > C

Re: Path parameters with RewriteValve

2019-09-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Alain, On 9/13/19 13:37, Alain Sellerin wrote: > Tomcat version: 8.5 OS: Win10, Linux > > Hi, > > I'm facing an issue with an application that is using path > parameters in conjunction with a RewriteValve. > > I

Path parameters with RewriteValve

2019-09-13 Thread Alain Sellerin
Tomcat version: 8.5 OS: Win10, Linux Hi, I'm facing an issue with an application that is using path parameters in conjunction with a RewriteValve. I narrowed down the problem by using the sample application available here: https://tomcat.apache.org/tomcat-8.5-doc/appdev/sample/ Co

rewritevalve logging

2019-01-21 Thread Chris Cheshire
I am trying to convert some url rewriting rules from tuckey rewrite filter to tomcat's rewrite valve. In my context.xml I have In my WEB-INF directory I have a rewrite.config file with a couple of rules. In tomcat's logging.properties I have org.apache.catalina.core.ContainerBase.[Catalina].[

RewriteValve and REQUEST_FILENAME not working

2017-12-16 Thread Norbert Harrer
Hi. I use Tomcat 8.5.23. My context.xml looks like this:                 className="org.apache.catalina.valves.rewrite.RewriteValve" /> WEB-INF/rewrite.config     My rewrite.config looks like this:     RewriteCond %{REQUEST_FILENAME} !-f     RewriteCond %{REQUEST_FILENAME} !-d     Rewrite

Re: RewriteValve and the ROOT webapp

2017-08-31 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 8/30/17 5:03 PM, Mark Thomas wrote: > On 30/08/17 21:46, Dan Rabe wrote: >> I’m using Tomcat 8.5.20, trying to use the rewrite valve to >> rewrite a root-level URL (/foo) to a URL in my webapp >> (/mywebapp/bar). >> >> I added the rewrite

Re: RewriteValve and the ROOT webapp

2017-08-30 Thread tomcat
On 30.08.2017 22:46, Dan Rabe wrote: I’m using Tomcat 8.5.20, trying to use the rewrite valve to rewrite a root-level URL (/foo) to a URL in my webapp (/mywebapp/bar). I added the rewrite valve to my server.xml, and I put my rewrite.config in conf/Catalina/localhost. This all works great IF I

Re: RewriteValve and the ROOT webapp

2017-08-30 Thread Mark Thomas
On 30/08/17 21:46, Dan Rabe wrote: > I’m using Tomcat 8.5.20, trying to use the rewrite valve to rewrite a > root-level URL (/foo) to a URL in my webapp (/mywebapp/bar). > > I added the rewrite valve to my server.xml, and I put my rewrite.config in > conf/Catalina/localhost. > > This all works

RewriteValve and the ROOT webapp

2017-08-30 Thread Dan Rabe
I’m using Tomcat 8.5.20, trying to use the rewrite valve to rewrite a root-level URL (/foo) to a URL in my webapp (/mywebapp/bar). I added the rewrite valve to my server.xml, and I put my rewrite.config in conf/Catalina/localhost. This all works great IF I create an empty “ROOT” directory in we

Re: Issue between RewriteValve and DefaultServlet

2017-06-27 Thread Jérémie Barthés
06/17 10:55, Jérémie Barthés wrote: Hi, I have an issue between org.apache.catalina.valves.rewrite.RewriteValve and org.apache.catalina.servlets.DefaultServlets If my request is forwarded by the RewriteValve and then pass into doDirectoryRedirect in DefaultServlets to be redirected. The hidden rewritten URI is

Re: Issue between RewriteValve and DefaultServlet

2017-06-26 Thread Mark Thomas
mas a écrit : >> On 26/06/17 10:55, Jérémie Barthés wrote: >>> Hi, >>> >>> I have an issue between org.apache.catalina.valves.rewrite.RewriteValve >>> and org.apache.catalina.servlets.DefaultServlets >>> >>> If my request is forwarded by the

Re: Issue between RewriteValve and DefaultServlet

2017-06-26 Thread Jérémie Barthés
rémie Barthés wrote: Hi, I have an issue between org.apache.catalina.valves.rewrite.RewriteValve and org.apache.catalina.servlets.DefaultServlets If my request is forwarded by the RewriteValve and then pass into doDirectoryRedirect in DefaultServlets to be redirected. The hidden rewritten URI is disp

Re: Issue between RewriteValve and DefaultServlet

2017-06-26 Thread Mark Thomas
On 26/06/17 10:55, Jérémie Barthés wrote: > Hi, > > I have an issue between org.apache.catalina.valves.rewrite.RewriteValve > and org.apache.catalina.servlets.DefaultServlets > > If my request is forwarded by the RewriteValve and then pass into > doDirectoryRedirect in

Issue between RewriteValve and DefaultServlet

2017-06-26 Thread Jérémie Barthés
Hi, I have an issue between org.apache.catalina.valves.rewrite.RewriteValve and org.apache.catalina.servlets.DefaultServlets If my request is forwarded by the RewriteValve and then pass into doDirectoryRedirect in DefaultServlets to be redirected. The hidden rewritten URI is displayed in the

Re: RewriteValve forward or redirect ?

2017-06-22 Thread Jérémie Barthés
May you please test RewriteValve with any tomcat after version 8 with following conditions : add RewriteValve in conf/server.xml add rewriteRule in conf/Catalina/localhost/rewrite.config RewriteRule ^/IWantThisVisible/(.*)$ /examples/$1/ start tomcat go to following URL (any internet

Re: RewriteValve forward or redirect ?

2017-06-20 Thread Jérémie Barthés
RewriteRule ^/visibleURL/(.*)$ /examples/$1/ (missing space between ^/visibleURL/(.*)$ and /examples/$1/) Le 20/06/2017 à 18:31, Jérémie Barthés a écrit : please test what i put in my mail : install a brand new tomcat 9 from archive (last version) put a RewriteValve in server.xml in the

Re: RewriteValve forward or redirect ?

2017-06-20 Thread Jérémie Barthés
please test what i put in my mail : install a brand new tomcat 9 from archive (last version) put a RewriteValve in server.xml in the file /conf/Catalina/localhost/rewrite.config add RewriteRule ^/visibleURL/(.*)$/examples/$1/ now start tomcat and go to /visibleURL/servlets/ then go to

Re: RewriteValve forward or redirect ?

2017-06-20 Thread Christopher Schultz
ed" and "page displayed"? It sounds like you want the URL to look exactly as it does look. - -chris > Le 20/06/2017 à 15:26, Jérémie Barthés a écrit : >> Hi, >> >> I have some issues with my brand new tomcat 9.0.0.M21 >> >> I just unzipped *wi

Re: RewriteValve forward or redirect ?

2017-06-20 Thread Jérémie Barthés
://192.168.1.1:8080/examples/servlets/ i don't want http://192.168.1.1:8080/examples/servlets/ to be displayed ! Le 20/06/2017 à 15:26, Jérémie Barthés a écrit : Hi, I have some issues with my brand new tomcat 9.0.0.M21 I just unzipped *windows-64 core* Then i added the *RewriteValve *in

RewriteValve forward or redirect ?

2017-06-20 Thread Jérémie Barthés
Hi, I have some issues with my brand new tomcat 9.0.0.M21 I just unzipped *windows-64 core* Then i added the *RewriteValve *in *conf/server.xml* / autoDeploy="true">// // // //className="org.apache.catalina.valves.re

RewriteValve escaping $ to %24

2015-12-17 Thread Sunil Shah
Hi, I've been struggling with this bug for a little while now and was hoping you might provide some insight. We're running Jenkins inside Tomcat and using the RewriteValve to rewrite incoming URLs on / to /service/jenkins/. We notice that for requests for /$stapler/render..., the $

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-23 Thread Jérémie Barthés
Hi, I send you the patch from 8.0.15 Tell me if it doesn't match with what you expected Kind regards, Jérémie Index: RewriteValve.java === --- RewriteValve.java(revision 1661627) +++ RewriteValve.java(working copy) @@ -45,

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-20 Thread Konstantin Kolinko
2015-02-20 19:41 GMT+03:00 Christopher Schultz : > > Jérémie, > > On 2/20/15 4:48 AM, Jérémie Barthés wrote: >> "instead of just a snippet of "fixed" code" >> >> Sorry Chris,i didn't read this. >> >> How do you want me to provide the patch ? > > Presumably, you have a copy of the source code. If yo

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-20 Thread Christopher Schultz
riginal/RewriteValve.java \ java/org/apache/catalina/valves/rewrite/RewriteValve.java \ > patch.file - -chris > Le 20/02/2015 10:31, Jérémie Barthés a écrit : >> I send you the patch i did to fix my issue with the RewriteValve >> (it was for the 8.0.15), The goal of

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-20 Thread Jérémie Barthés
Le 20/02/2015 11:22, Rémy Maucherat a écrit : 2015-02-20 10:31 GMT+01:00 Jérémie Barthés : I send you the patch i did to fix my issue with the RewriteValve (it was for the 8.0.15), The goal of that patch is to block the RewriteValve if a 302 automatic folder '/' redirection o

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-20 Thread Rémy Maucherat
2015-02-20 10:31 GMT+01:00 Jérémie Barthés : > I send you the patch i did to fix my issue with the RewriteValve (it was > for the 8.0.15), > The goal of that patch is to block the RewriteValve if a 302 automatic > folder '/' redirection occurs. The RewriteValve will rewrit

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-20 Thread Jérémie Barthés
"instead of just a snippet of "fixed" code" Sorry Chris,i didn't read this. How do you want me to provide the patch ? Jérémie Le 20/02/2015 10:31, Jérémie Barthés a écrit : I send you the patch i did to fix my issue with the RewriteValve (it was for the 8.0.15), The

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-20 Thread Jérémie Barthés
I send you the patch i did to fix my issue with the RewriteValve (it was for the 8.0.15), The goal of that patch is to block the RewriteValve if a 302 automatic folder '/' redirection occurs. The RewriteValve will rewrite the redirected URL. first step : http://localhost:8080/my

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-20 Thread Felix Schumacher
Am 20.02.2015 08:49, schrieb Rainer Jung: Am 19.02.2015 um 22:13 schrieb Felix Schumacher: Am 19.02.2015 um 21:41 schrieb André Warnier: Jérémie Barthés wrote: ... Make a file rewrite.config in conf/Catalina/localhost/ that contains : RewriteRule^/mypath/(.*)$/examples/jsp/$1 copy

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Rainer Jung
Am 19.02.2015 um 22:13 schrieb Felix Schumacher: Am 19.02.2015 um 21:41 schrieb André Warnier: Jérémie Barthés wrote: ... Make a file rewrite.config in conf/Catalina/localhost/ that contains : RewriteRule^/mypath/(.*)$/examples/jsp/$1 copy the line in the conf/server.xml fil

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Felix Schumacher
Am 20. Februar 2015 00:43:40 MEZ, schrieb "André Warnier" : >André Warnier wrote: >> Felix Schumacher wrote: >>> Am 19.02.2015 um 21:41 schrieb André Warnier: Jérémie Barthés wrote: ... >... > in the browser, you have to modify your rewrite rules, perhaps by using a Rewr

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread André Warnier
André Warnier wrote: Felix Schumacher wrote: Am 19.02.2015 um 21:41 schrieb André Warnier: Jérémie Barthés wrote: ... ... in the browser, you have to modify your rewrite rules, perhaps by using a RewriteCond with the -d flag, to check first if the URL points to an existing directory, and

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread André Warnier
Felix Schumacher wrote: Am 19.02.2015 um 21:41 schrieb André Warnier: Jérémie Barthés wrote: ... Make a file rewrite.config in conf/Catalina/localhost/ that contains : RewriteRule^/mypath/(.*)$/examples/jsp/$1 copy the line className="org.apache.catalina.valves.rewrite.Rewrit

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Felix Schumacher
Am 19.02.2015 um 21:41 schrieb André Warnier: Jérémie Barthés wrote: ... Make a file rewrite.config in conf/Catalina/localhost/ that contains : RewriteRule^/mypath/(.*)$/examples/jsp/$1 copy the line className="org.apache.catalina.valves.rewrite.RewriteValve" /> in the conf/s

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread André Warnier
Jérémie Barthés wrote: ... Make a file rewrite.config in conf/Catalina/localhost/ that contains : RewriteRule^/mypath/(.*)$/examples/jsp/$1 copy the line className="org.apache.catalina.valves.rewrite.RewriteValve" /> in the conf/server.xml file, line 131 Since this is a Val

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Christopher Schultz
since you have mapped /mypath/async to /examples/jsp/async, which is a directory. The DefaultServlet tries to serve that "directory" and redirects the user to the same URL with a "/" on the end. This isn't necessarily a problem with the RewriteValve, but with a perhaps unexpecte

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Jérémie Barthés
15 4:54 AM, Jérémie Barthés wrote: When an URL target a folder on the server, tomcat automaticly add a "/" at the end of the URL if missing : myHost.com/myFolder => myHost.com/myFolder/ (automatic tomcat 302 redirection) If you use a rewriteValve to forward "myHost.com/myFolder&

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Jérémie Barthés
ot; at the end of the URL if missing : myHost.com/myFolder => myHost.com/myFolder/ (automatic tomcat 302 redirection) If you use a rewriteValve to forward "myHost.com/myFolder" to "myHost.com/rewriteTrick/myFolder", the rewriteValve will forward simultaneous with the autom

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Christopher Schultz
tomcat 302 redirection) > > If you use a rewriteValve to forward "myHost.com/myFolder" to > "myHost.com/rewriteTrick/myFolder", the rewriteValve will forward > simultaneous with the automatic tomcat redirection. Then the > client's browser will catch the rewritten

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-19 Thread Jérémie Barthés
Hi Chris, When an URL target a folder on the server, tomcat automaticly add a "/" at the end of the URL if missing : myHost.com/myFolder => myHost.com/myFolder/ (automatic tomcat 302 redirection) If you use a rewriteValve to forward "myHost.com/myFolder" to "myHo

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jérémie, On 2/17/15 10:47 AM, Jérémie Barthés wrote: > I don't have more to say than : > > "There is a bug using the RewriteValve :If you are targeting a > folder and there is no "/" at the end of the URI, The

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-17 Thread Jérémie Barthés
Hi, I don't have more to say than : "There is a bug using the RewriteValve :If you are targeting a folder and there is no "/" at the end of the URI, the rewritten URI is visible for the client browser (302 redirection). Example : http://myhost.com/myFolder => http://

Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jérémie, On 2/17/15 6:20 AM, Jérémie Barthés wrote: > I just installed tomcat 8 and used the RewriteValve to forward some > old URLs on my new tomcat8 webapp. I had an issue for URIs > targeting a folder: If there is no "/" at

Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-17 Thread Jérémie Barthés
Hi, I just installed tomcat 8 and used the RewriteValve to forward some old URLs on my new tomcat8 webapp. I had an issue for URIs targeting a folder: If there is no "/" at the end of the URI, the rewritten URI is visible for the client browser (302 redirection). Example : http://