0

i've setted up this virtualhost,

<VirtualHost *:443>
      ServerName test.domain.org
      DocumentRoot "/u02/config/www/tst-12c"
      RewriteEngine on
      RewriteCond %{REQUEST_METHOD} ^(OPTIONS)
      RewriteRule .* - [F]
      RewriteEngine On
  RedirectMatch ^/ui/#/project/([^/]+)$ /ui-v2/#/project/$1

  #  SSL Engine Switch:
  #  Enable/Disable SSL for this virtual host.
  SSLEngine on

   &lt;FilesMatch &quot;\.(cgi|shtml|phtml|php)$&quot;&gt;
      SSLOptions +StdEnvVars
   &lt;/FilesMatch&gt;

   &lt;Directory &quot;${ORACLE_INSTANCE}/config/fmwconfig/components/${COMPONENT_TYPE}/instances/${COMPONENT_NAME}/cgi-bin&quot;&gt;
      SSLOptions +StdEnvVars
   &lt;/Directory&gt;

   &lt;Directory &quot;/u02/config/www/tst-12c/&quot;&gt;
      Options Indexes FollowSymLinks
      AllowOverride ALL
      Require all granted
   &lt;/Directory&gt;

   BrowserMatch &quot;MSIE [2-5]&quot; \
   nokeepalive ssl-unclean-shutdown \
   downgrade-1.0 force-response-1.0

   &lt;Proxy &quot;balancer://api_cluster&quot;&gt;
        BalancerMember &quot;http://realbackend_server1:9006/api&quot;
        BalancerMember &quot;http://realbackend_server1:9006/api&quot;
   &lt;/Proxy&gt;
   ProxyPass &quot;/api&quot; &quot;balancer://api_cluster&quot;
   ProxyTimeout 240

but the RedirectMatch rule is not working , i've enabled the debug mode, and i see all is being redirected to /api which the RedirectMatch does the comparison to.

in the debug files i see messages like :

AH00947: connected /api/virtualassistant/RG1080A-02 to realbackend_server1:9006, referer https://test.domain.org/ui/

RewriteCond: input='/api/virtualassistant/RG1080A-02' pattern='^/ui/#/project/([^/]+)' [NC] => not-matched, referer https://test.domain.org/ui/

which means the RedirectMatch is working , but being executed after the ProxyPass is done, rather than before. i've tried RewriteRule too, but it does the same.

any clue why this is happening and how can i solve it?

regards

Red
  • 1

0 Answers0