Am 21.03.22 um 06:39 schrieb rupali singh:
Hi Felix,

location of context.xml file is

  cat context.xml| grep RewriteValve
     <Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
That context.xml is thought to be a default template for all installed webapps. It will work, but remember, that every installed webapp will get its own copy of a rewrite valve.

RewriteCond %{QUERY_STRING} p=10001
RewriteRule ^/apex/f$ /apex/myapp [R,L]

What happens, when you call the apex URL with curl? Something like

> curl -D- 'localhost:8080/apex/f?p=10001'

It should display (assuming your tomcat listens on port 8080) something like:

HTTP/1.1 302
Location: /apex/myapp?p=10001
Content-Length: 0
Date: Mon, 21 Mar 2022 ...


its still not working

On Mon, 21 Mar 2022 at 00:57, Felix Schumacher <> wrote:

Am 20.03.22 um 19:45 schrieb Thomas Hoffmann (Speed4Trade GmbH):


url rewrite doesn't match against url parameters as far as I know.
RewriteRule ^/apex/f$  /apex/myapp [R,L]

You can match the query string by adding a RewriteCond, for example

RewriteCond %{QUERY_STRING} p=1001
RewriteRule ^/apex/f$ /apex/myapp [R,L]

(The lines have to be in that order and no other line in between)


Just a guess, maybe you can  give it a try.

Another option would be to use the source code of tomcat and set a breakpoint 
within the filter class
(just with a little dummy app deployed).

Greetings, Thomas

-----Ursprüngliche Nachricht-----
Von: rupali singh<>  <>
Gesendet: Sonntag, 20. März 2022 19:23
An: Tomcat Users List<>  <>
Betreff: Re: Fwd: tomcat 9.50 - rewrite rule question


i have referred Around 
but still can't figure out how to write rules for my requirements..
can you please help

On Sat, 19 Mar 2022 at 21:57, Thomas Hoffmann (Speed4Trade 
<>  wrote:


just scroll down the documentation.
Around here:
If something is not clear there, just drop a line

-----Ursprüngliche Nachricht-----
Von: rupali singh<>  <>
Gesendet: Samstag, 19. März 2022 18:28
An: Tomcat Users List<>  <>
Betreff: Re: Fwd: tomcat 9.50 - rewrite rule question


Thanks a lot for your quick response.then what options we have in
tomcat apache for rewrite rules.

Apologies im new to apache tomcat.

On Sat, Mar 19, 2022, 9:42 PM Terence M. Bandoian<>  

On 3/19/2022 1:03 AM, rupali singh wrote:

Hi Team,

We are using tomcat 9.54 version.
Need help in rewriting rule.

background   : We have an Oracle apex server ( version 21.1)  and



installed on the same server. We have F5 url which redirects to
apex installed on tomcat  
<>    so is published on our F5


redirects internally to tomcat server on port 8080.

we want to redirect<>  
<>    to  <>  
<>    as it's


for business users to remember f?p=1001<>  

i have prepared context.xml and rewrite.config rule but
redirection not working and there is no error in catalina.log

in access log we are getting 404.

i have tried steps mentioned in



rewrite.config content

RewriteCond %{REQUEST_URI} ^/myapp$ RewriteRule 
^/myapp$  [R,L]

please advise how to resolve the issue

Those look like Apache HTTPD rewrite rules. How are they supported
in Apache Tomcat?

-Terence Bandoian

--- To unsubscribe,
For additional commands,

Thanks and Regards,

To unsubscribe,
For additional commands,

Attachment: OpenPGP_0xEA6C3728EA91C4AF.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to