Hi,
I made a scenario to make the issue happens :
Use a tomcat 8.0.18
Make a file rewrite.config in conf/Catalina/localhost/ that contains :
RewriteRule ^/mypath/(.*)$ /examples/jsp/$1
copy the line
<Valve
className="org.apache.catalina.valves.rewrite.RewriteValve" />
in the conf/server.xml file, line 131
launch the server
try the followings URLs :
http://localhost:8080/mypath/async
http://localhost:8080/mypath/async/
the result i have is :
http://localhost:8080/mypath/async =>
http://localhost:8080/examples/jsp/async/ (visible rewrite)
http://localhost:8080/mypath/async/ => http://localhost:8080/mypath/async/
Jérémie
Le 19/02/2015 15:25, Jérémie Barthés a écrit :
Tell me what you need about my configuration :
rewrite.config file :
RewriteRule ^/jamfiles/(.*)$ /newapp/jamfiles/$1
RewriteRule ^/workspace/(.*)$ /newapp/htdocuments/workspace/$1
RewriteRule ^/([a-zA-Z0-9]+)(\.jsp|\.html|\.txt)$
/newapp/htdocuments/$1$2
tomcat version : 8.0.15 (tried on 8.0.18 too)
Operating System : tried on windows 7 and unix
Le 19/02/2015 15:15, Christopher Schultz a écrit :
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Jérémie,
On 2/19/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" to
"myHost.com/rewriteTrick/myFolder", the rewriteValve will forward
simultaneous with the automatic tomcat redirection. Then the
client's browser will catch the rewritten URL (you don't want the
rewritten URL to be visible for the client's browser).
myHost.com/myFolder redirect to myHost.com/rewriteTrick/myFolder/
(visible)
So i made a patch to block the RewriteValve if an automatic 302
tomcat redirection is applied. Then the RewriteValve forward in a
second time and the rewritten URL is not visible for the client's
Browser : myHost.com/myFolder redirect to myHost.com/myFolder/
forward to myHost/rewriteTrick/myFolder/ (not visible)
It may be a configuration mistake of my part. I tried many
different configurations to avoid it but i wasn't able without
coding a patch.
It /may/ be a configuration problem. We won't know until you post your
configuration.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
iQIcBAEBCAAGBQJU5e/qAAoJEBzwKT+lPKRYPaAP/jtr2XC2ZViVzUDK44Fqcl+P
q1LRRKO112Hzv+p35kUAPFQn2YyvJamqH7dnl6rVnBIY5YviBCNqJdpn48fpe78E
B/T5nr9WOfdMxg9fBgMG78L+ihJzKgiZpXGgVvR68RLuYgeWPhnur2I3Xcj4rLRc
Nd9aWX/vHX3aLoh3ThTUKIWVmaiK8a5JP240W/5g65OE07Tnc/albiBHvTdGbEBQ
LoLKmp315mZLDkzzNIsu7Lbbz8DtDrJo+Oaos1Fm3CUBM5ULO0hwcFr1IyxL2Tvk
1S8ZGHaDvFQF0II0pf9P8MgpDfK1st1rGp86k1B3e1KMt7gWFytOZwPgJLwCDqVe
VAfgE4VpnJ8aBtVAKc1vTpNpP4X4xuFuKl93OtAbaFa9mBhdfetbeCo7OLogeSB+
UZj3PQnM7rLoyllXtEx4hGSDy+AU3o/S7JqXrJdbHMqt1v/BmEd/ZsdAYCOa+lmb
JEkxPUG+EPTMxyiCrw498KjY2q5Z9naA/IecIHdPGa7u2TwIlkMCJazCtBEmSu8d
VfDQyxR1f+eExsTa3i8eIjdw+z/hTsgMJYi0qiI2slkWOp99N9xWNdH/W5UdHKWf
Qb8fefesWyKQof0voqWPbOXOFdgcJqXs26K1gxRM9rZSzfV990Ooizohg/DfGYjG
Y2AZNcubxOPam0aEVct9
=ClXj
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org