I have a Tomcat behind an Apache server and I would like to use the https request to be rewritten to the Tomcat on port 9001 with a hidden subfolder /test.
hosts entry:
127.0.0.1 local.domain.com
I tried the following in different configurations in the httpd.conf but with no success:
VirtualHost 127.0.0.1:80
RewriteEngine on
RewriteCond %{HTTPS_HOST} ^(www\.)?local\.domain\.com$ [NC]
RewriteCond $1 !^subdir/
RewriteRule ^(.*)$ https://local.domain.com:9001/subdir/$1 [L,QSA]