0 Replies Latest reply on Feb 10, 2020 2:23 PM by tirone

    ORDS and TOMCAT rewrite rules

    tirone

      hi,

      i am working in the following environment .

       

      TomCat 9.0.30  (listen on port 80)

      Windows server 2016,

      ORDS 19.4 used only for APEX 19.2  deployed on Tomcat as apex webapp (no ords)

      Oracle Database 18c Standard Edition 2 Release 18.0.0.

      Version 18.3.0.0.0

       

      In my windows PC I have in etc/host file the following entry

       

      xxx.xxx.xxx.xxx  myapp

       

       

      when in my browser I use the URL :

       

      http//xxx.xxx.xxx.xxx              -- I get the tomcat 9.0.30 Home page ----- O.K.

       

      http//xxx.xxx.xxx.xxx/apex     -- I get the apex 4550 page                 ----- O.K.

       

      http//myapp                        -- I get the tomcat 9.0.30 Home page  ----- O.K.

       

       

      now in the rewrite.config file of tomcat apex webapps I defined the following rewrite rule :

       

      RewriteCond %{HTTP_HOST} ^myapp$

      RewriteRule ^/$ http://xxx.xxx.xxx.xxx/apex/f?p=104 [R=301,NC]

       

      but when in my browser I use the URL :

       

      http//myapp               -- I get the tomcat 9.0.30 Home page ----- K.O. I would like to get the home page of my 104 apex application !!!!

       

      http//myapp/apex       -- I get http://xxx.xxx.xxx.xxx/apex/f?p=104 --- RewriteRule has been applied: i get the home page of my application

       

      It seems that the rewrite rule is applied only if I add /apex.
      The rewrite rule itself (same syntax) works as I wish using OHS (apache) and mod_plsql instead of ORDS/Tomcat

       

      Where am I doing wrong ?
      thank you

       

      saverio

       

      no one can help me?