Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-20 Thread rupali singh
Hi Felix,

location of context.xml file is

 cat context.xml| grep RewriteValve

 pwd
/opt/tomcat/apache-tomcat-9.0.54/instance/conf



more
/opt/tomcat/apache-tomcat-9.0.54/instance/webapps/ROOT/WEB-INF/rewrite.config
RewriteCond %{QUERY_STRING} p=10001
RewriteRule ^/apex/f$ /apex/myapp [R,L]

its still not working


On Mon, 21 Mar 2022 at 00:57, Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

>
> Am 20.03.22 um 19:45 schrieb Thomas Hoffmann (Speed4Trade GmbH):
>
> Hello,
>
> 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)
>
> Felix
>
> 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
>
> Hi,
>
> i have referred Around 
> here:https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> 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 
> GmbH) 
>  wrote:
>
>
> Hallo,
>
> just scroll down the documentation.
> Around here:https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> 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
>
> Hi,
>
> 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 
> 
> wrote:
>
>
> 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
>
> tomcat
>
> is
>
> installed on the same server. We have F5 url which redirects to
> apex installed on tomcat  eg 
> https://xyz.ae/apex/f?p=1001 
>    so xyz.ae is published on our F5
>
> which
>
> redirects internally to tomcat server on port 8080.
>
> we want to redirect  
> https://xyz.ae/apex/f?p=1001 
>    to
>   https://xyz.ae/apex/myapp  
>    as it's
>
> difficult
>
> 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
>
>
> https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-with
> -
>
> ord
>
> s-and-oracle-apex
>
> rewrite.config content
>
> RewriteCond %{REQUEST_URI} ^/myapp$ RewriteRule 
> ^/myapp$https://xyz.ae/apex/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, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>  --
> Thanks and Regards,
> Rupali
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 
Thanks and Regards,
Rupali


Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-20 Thread Felix Schumacher


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

Hello,

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)

Felix



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

Hi,

i have referred Around here:
https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
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 GmbH)
  wrote:


Hallo,

just scroll down the documentation.
Around here:
https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
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

Hi,

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

wrote:


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

tomcat

is

installed on the same server. We have F5 url which redirects to
apex installed on tomcat  eghttps://xyz.ae/apex/f?p=1001
so xyz.ae is published on our F5

which

redirects internally to tomcat server on port 8080.

we want to redirecthttps://xyz.ae/apex/f?p=1001
to
   https://xyz.ae/apex/myapp  as it's

difficult

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


https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-with
-

ord

s-and-oracle-apex

rewrite.config content

RewriteCond %{REQUEST_URI} ^/myapp$ RewriteRule ^/myapp$
https://xyz.ae/apex/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, e-mail:users-unsubscr...@tomcat.apache.org
For additional commands, e-mail:users-h...@tomcat.apache.org




--
Thanks and Regards,
Rupali

-
To unsubscribe, e-mail:users-unsubscr...@tomcat.apache.org
For additional commands, e-mail:users-h...@tomcat.apache.org



OpenPGP_0xEA6C3728EA91C4AF.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-20 Thread Felix Schumacher


Am 20.03.22 um 20:17 schrieb rupali singh:

Hi Thomas,
thanks for the quick reply.
I have tried below but it's still not working.

RewriteRule ^/apex/f$  /apex/myapp [R,L]

I have placed rewrite.config on below locations and fileis same in both
locations , after changing rewrite.config i'm restarting tomcat as well.
/opt/tomcat/apache-tomcat-9.0.54/instance/webapps/ROOT/WEB-INF/rewrite.config
and
/opt/tomcat/apache-tomcat-9.0.54/instance/webapps/apex/WEB-INF/rewrite.config


Have you added the RewriteValve to your context.xml? And if so, are you 
sure, that it is the one, that tomcat uses?


Where did you place context.xml and have you checked 
Catalina/localhost/apex.xml has not been copied earlier?


Felix




i'm new to apache tomcat and now aware of how to achieve below.


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).

On Sun, 20 Mar 2022 at 22:46, Thomas Hoffmann (Speed4Trade GmbH)
  wrote:


Hello,

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

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

Hi,

i have referred Around here:
https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
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 GmbH)
  wrote:


Hallo,

just scroll down the documentation.
Around here:
https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
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

Hi,

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

wrote:


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

tomcat

is

installed on the same server. We have F5 url which redirects to
apex installed on tomcat  eghttps://xyz.ae/apex/f?p=1001
so xyz.ae is published on our

F5

which

redirects internally to tomcat server on port 8080.

we want to redirecthttps://xyz.ae/apex/f?p=1001
to
   https://xyz.ae/apex/myapp  as

it's

difficult

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


https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-with
-

ord

s-and-oracle-apex

rewrite.config content

RewriteCond %{REQUEST_URI} ^/myapp$ RewriteRule ^/myapp$
https://xyz.ae/apex/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, e-mail:users-unsubscr...@tomcat.apache.org
For additional commands, e-mail:users-h...@tomcat.apache.org




--
Thanks and Regards,
Rupali




OpenPGP_0xEA6C3728EA91C4AF.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-20 Thread Felix Schumacher


Am 19.03.22 um 07:03 schrieb rupali singh:

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 tomcat is
installed on the same server. We have F5 url which redirects to apex
installed on tomcat  eghttps://xyz.ae/apex/f?p=1001
so xyz.ae is published on our F5 which
redirects internally to tomcat server on port 8080.

we want to redirecthttps://xyz.ae/apex/f?p=1001
to
  https://xyz.ae/apex/myapp  as it's difficult
for business users to remember f?p=1001


Are you sure, that you want to redirect the obscure URL - that is hard 
to remember - to redirect to a "sane" URL - that is easy to remember? I 
would do it the other way round. Tell the people to enter 
https://apex.ae/myapp (or apex.com/myapp) and let the app rewrite it to 
something hard to remember.


Felix



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
https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-with-ords-and-oracle-apex

rewrite.config content

RewriteCond %{REQUEST_URI} ^/myapp$
RewriteRule ^/myapp$https://xyz.ae/apex/myapp  [R,L]


please advise how to resolve the issue


OpenPGP_0xEA6C3728EA91C4AF.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-20 Thread rupali singh
Hi,

Yes im restarting the tomcat after changing the rewrite. Config file.


i have increased log level to FINE


*cat /opt/tomcat/apache-tomcat-9.0.54/instance/conf/logging.properties |
grep FINE*
1catalina.org.apache.juli.AsyncFileHandler.level = FINE
2localhost.org.apache.juli.AsyncFileHandler.level = FINE
3manager.org.apache.juli.AsyncFileHandler.level = FINE
4host-manager.org.apache.juli.AsyncFileHandler.level = FINE
java.util.logging.ConsoleHandler.level = FINE
*org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = FINE*
#org.apache.catalina.util.LifecycleBase.level = FINE
#org.apache.jasper.compiler.TldLocationsCache.level = FINE
#org.apache.coyote.http2.level = FINE
#org.apache.tomcat.websocket.level = FINE


in which log file it will write detailed errors/issues/ trace details

i have checked below files but cant see anything related to rewrite rules.
its all normal logs only

catalina.out
catalina.2022-03-20.log
localhost_access_log.2022-03-20.txt


 cat localhost_access_log.2022-03-20.txt | grep myapp
x.x.x.x - - [20/Mar/2022:20:08:47 +] "GET /apex/myapp HTTP/1.1" 404
16681





On Mon, Mar 21, 2022, 1:25 AM Thomas Hoffmann (Speed4Trade GmbH)
 wrote:

> Hello,
>
> the location under /WEB-INF/ is the correct one.
> Did you restart tomcat afterwards? The config is loaded during startup.
>
> Maybe you can activate logging via logging.properties
>
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = FINE
>
> Should spit out plenty of information in one of the logfiles.
>
>
> > -Ursprüngliche Nachricht-
> > Von: rupali singh 
> > Gesendet: Sonntag, 20. März 2022 20:17
> > An: Tomcat Users List 
> > Betreff: Re: Fwd: tomcat 9.50 - rewrite rule question
> >
> > Hi Thomas,
> > thanks for the quick reply.
> > I have tried below but it's still not working.
> >
> > RewriteRule ^/apex/f$  /apex/myapp [R,L]
> >
> > I have placed rewrite.config on below locations and fileis same in both
> > locations , after changing rewrite.config i'm restarting tomcat as well.
> > /opt/tomcat/apache-tomcat-9.0.54/instance/webapps/ROOT/WEB-
> > INF/rewrite.config
> > and
> > /opt/tomcat/apache-tomcat-9.0.54/instance/webapps/apex/WEB-
> > INF/rewrite.config
> >
> >
> > i'm new to apache tomcat and now aware of how to achieve below.
> >
> >
> > 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).
> >
> > On Sun, 20 Mar 2022 at 22:46, Thomas Hoffmann (Speed4Trade GmbH)
> >  wrote:
> >
> > > Hello,
> > >
> > > url rewrite doesn't match against url parameters as far as I know.
> > > RewriteRule ^/apex/f$  /apex/myapp [R,L]
> > >
> > > 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
> > > >
> > > > Hi,
> > > >
> > > > i have referred Around here:
> > > > https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> > > > 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 GmbH)
> > > >  wrote:
> > > >
> > > > > Hallo,
> > > > >
> > > > > just scroll down the documentation.
> > > > > Around here:
> > > > > https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> > > > > 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
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > 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
> > > > > > 
> > > > > > wrote:
> > > > > >
> > > > > > > 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
> > > > > tomcat
> > > > > > > is
> > > > > > > > installed on the same server. We have F5 url which redirects
> > > > > > > > to apex installed on tomcat  eg https://xyz.ae/apex/f?p=1001
> > > > > > > >    so xyz.ae is published on
> our
> > > F5
> > > > > > which
> > > > > > > > redirects internally to tomcat server on port 8080.
> > 

AW: Fwd: tomcat 9.50 - rewrite rule question

2022-03-20 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello,

the location under /WEB-INF/ is the correct one.
Did you restart tomcat afterwards? The config is loaded during startup.

Maybe you can activate logging via logging.properties

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = FINE

Should spit out plenty of information in one of the logfiles.


> -Ursprüngliche Nachricht-
> Von: rupali singh 
> Gesendet: Sonntag, 20. März 2022 20:17
> An: Tomcat Users List 
> Betreff: Re: Fwd: tomcat 9.50 - rewrite rule question
> 
> Hi Thomas,
> thanks for the quick reply.
> I have tried below but it's still not working.
> 
> RewriteRule ^/apex/f$  /apex/myapp [R,L]
> 
> I have placed rewrite.config on below locations and fileis same in both
> locations , after changing rewrite.config i'm restarting tomcat as well.
> /opt/tomcat/apache-tomcat-9.0.54/instance/webapps/ROOT/WEB-
> INF/rewrite.config
> and
> /opt/tomcat/apache-tomcat-9.0.54/instance/webapps/apex/WEB-
> INF/rewrite.config
> 
> 
> i'm new to apache tomcat and now aware of how to achieve below.
> 
> 
> 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).
> 
> On Sun, 20 Mar 2022 at 22:46, Thomas Hoffmann (Speed4Trade GmbH)
>  wrote:
> 
> > Hello,
> >
> > url rewrite doesn't match against url parameters as far as I know.
> > RewriteRule ^/apex/f$  /apex/myapp [R,L]
> >
> > 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
> > >
> > > Hi,
> > >
> > > i have referred Around here:
> > > https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> > > 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 GmbH)
> > >  wrote:
> > >
> > > > Hallo,
> > > >
> > > > just scroll down the documentation.
> > > > Around here:
> > > > https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> > > > 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
> > > > >
> > > > > Hi,
> > > > >
> > > > > 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
> > > > > 
> > > > > wrote:
> > > > >
> > > > > > 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
> > > > tomcat
> > > > > > is
> > > > > > > installed on the same server. We have F5 url which redirects
> > > > > > > to apex installed on tomcat  eg https://xyz.ae/apex/f?p=1001
> > > > > > >    so xyz.ae is published on our
> > F5
> > > > > which
> > > > > > > redirects internally to tomcat server on port 8080.
> > > > > > >
> > > > > > > we want to redirect  https://xyz.ae/apex/f?p=1001
> > > > > > >    to
> > > > > > >   https://xyz.ae/apex/myapp    as
> > it's
> > > > > > difficult
> > > > > > > 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
> > > > > > >
> > > > > > https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-
> > > > > > with
> > > > > > -
> > > > > ord
> > > > > > s-and-oracle-apex
> > > > > > >
> > > > > > > rewrite.config content
> > > > > > >
> > > > > > > RewriteCond %{REQUEST_URI} ^/myapp$ RewriteRule ^/myapp$
> > > > > > > https://xyz.ae/apex/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, e-mail:
> > > > > > 

Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-20 Thread rupali singh
Hi Thomas,
thanks for the quick reply.
I have tried below but it's still not working.

RewriteRule ^/apex/f$  /apex/myapp [R,L]

I have placed rewrite.config on below locations and fileis same in both
locations , after changing rewrite.config i'm restarting tomcat as well.
/opt/tomcat/apache-tomcat-9.0.54/instance/webapps/ROOT/WEB-INF/rewrite.config
and
/opt/tomcat/apache-tomcat-9.0.54/instance/webapps/apex/WEB-INF/rewrite.config


i'm new to apache tomcat and now aware of how to achieve below.


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).

On Sun, 20 Mar 2022 at 22:46, Thomas Hoffmann (Speed4Trade GmbH)
 wrote:

> Hello,
>
> url rewrite doesn't match against url parameters as far as I know.
> RewriteRule ^/apex/f$  /apex/myapp [R,L]
>
> 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
> >
> > Hi,
> >
> > i have referred Around here:
> > https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> > 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 GmbH)
> >  wrote:
> >
> > > Hallo,
> > >
> > > just scroll down the documentation.
> > > Around here:
> > > https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> > > 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
> > > >
> > > > Hi,
> > > >
> > > > 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
> > > > 
> > > > wrote:
> > > >
> > > > > 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
> > > tomcat
> > > > > is
> > > > > > installed on the same server. We have F5 url which redirects to
> > > > > > apex installed on tomcat  eg https://xyz.ae/apex/f?p=1001
> > > > > >    so xyz.ae is published on our
> F5
> > > > which
> > > > > > redirects internally to tomcat server on port 8080.
> > > > > >
> > > > > > we want to redirect  https://xyz.ae/apex/f?p=1001
> > > > > >    to
> > > > > >   https://xyz.ae/apex/myapp    as
> it's
> > > > > difficult
> > > > > > 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
> > > > > >
> > > > > https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-with
> > > > > -
> > > > ord
> > > > > s-and-oracle-apex
> > > > > >
> > > > > > rewrite.config content
> > > > > >
> > > > > > RewriteCond %{REQUEST_URI} ^/myapp$ RewriteRule ^/myapp$
> > > > > > https://xyz.ae/apex/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, e-mail: users-unsubscr...@tomcat.apache.org
> > > > > For additional commands, e-mail: users-h...@tomcat.apache.org
> > > > >
> > > > >
> > >
> >
> >
> > --
> > Thanks and Regards,
> > Rupali
>


-- 
Thanks and Regards,
Rupali


AW: Fwd: tomcat 9.50 - rewrite rule question

2022-03-20 Thread Thomas Hoffmann (Speed4Trade GmbH)
Hello,

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

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
> 
> Hi,
> 
> i have referred Around here:
> https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> 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 GmbH)
>  wrote:
> 
> > Hallo,
> >
> > just scroll down the documentation.
> > Around here:
> > https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> > 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
> > >
> > > Hi,
> > >
> > > 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
> > > 
> > > wrote:
> > >
> > > > 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
> > tomcat
> > > > is
> > > > > installed on the same server. We have F5 url which redirects to
> > > > > apex installed on tomcat  eg https://xyz.ae/apex/f?p=1001
> > > > >    so xyz.ae is published on our F5
> > > which
> > > > > redirects internally to tomcat server on port 8080.
> > > > >
> > > > > we want to redirect  https://xyz.ae/apex/f?p=1001
> > > > >    to
> > > > >   https://xyz.ae/apex/myapp    as it's
> > > > difficult
> > > > > 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
> > > > >
> > > > https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-with
> > > > -
> > > ord
> > > > s-and-oracle-apex
> > > > >
> > > > > rewrite.config content
> > > > >
> > > > > RewriteCond %{REQUEST_URI} ^/myapp$ RewriteRule ^/myapp$
> > > > > https://xyz.ae/apex/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, e-mail: users-unsubscr...@tomcat.apache.org
> > > > For additional commands, e-mail: users-h...@tomcat.apache.org
> > > >
> > > >
> >
> 
> 
> --
> Thanks and Regards,
> Rupali


Re: Fwd: tomcat 9.50 - rewrite rule question

2022-03-20 Thread rupali singh
Hi,

i have referred Around here:
https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
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 GmbH)
 wrote:

> Hallo,
>
> just scroll down the documentation.
> Around here:
> https://tomcat.apache.org/tomcat-9.0-doc/rewrite.html#RewriteRule
> 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
> >
> > Hi,
> >
> > 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 
> > wrote:
> >
> > > 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
> tomcat
> > > is
> > > > installed on the same server. We have F5 url which redirects to apex
> > > > installed on tomcat  eg https://xyz.ae/apex/f?p=1001
> > > >    so xyz.ae is published on our F5
> > which
> > > > redirects internally to tomcat server on port 8080.
> > > >
> > > > we want to redirect  https://xyz.ae/apex/f?p=1001
> > > >    to
> > > >   https://xyz.ae/apex/myapp    as it's
> > > difficult
> > > > 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
> > > >
> > > https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-with-
> > ord
> > > s-and-oracle-apex
> > > >
> > > > rewrite.config content
> > > >
> > > > RewriteCond %{REQUEST_URI} ^/myapp$
> > > > RewriteRule ^/myapp$ https://xyz.ae/apex/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, e-mail: users-unsubscr...@tomcat.apache.org
> > > For additional commands, e-mail: users-h...@tomcat.apache.org
> > >
> > >
>


-- 
Thanks and Regards,
Rupali


Re: tomcat 9.50 - rewrite rule question

2022-03-20 Thread rupali singh
Hi,

i have tried below but its not working

RewriteRule ^/apex/f?p=1001  /apex/myapp [R,L]

On Sat, 19 Mar 2022 at 10:19, Jason Wee  wrote:

> have you try?
>
> RewriteRule ^/apex/f?p=1001  /apex/myapp [R,L]
>
> On Sat, Mar 19, 2022 at 2:05 PM 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 tomcat
> is
> > installed on the same server. We have F5 url which redirects to apex
> > installed on tomcat  eg https://xyz.ae/apex/f?p=1001
> >    so xyz.ae is published on our F5 which
> > redirects internally to tomcat server on port 8080.
> >
> > we want to redirect  https://xyz.ae/apex/f?p=1001
> >    to
> >  https://xyz.ae/apex/myapp    as it's
> difficult
> > 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
> >
> https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-with-ords-and-oracle-apex
> >
> > rewrite.config content
> >
> > RewriteCond %{REQUEST_URI} ^/myapp$
> > RewriteRule ^/myapp$ https://xyz.ae/apex/myapp [R,L]
> >
> >
> > please advise how to resolve the issue
> > --
> > Thanks and Regards,
> > Rupali
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 
Thanks and Regards,
Rupali