1

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]
HBruijn
  • 72,524
  • 21
  • 127
  • 192
Cris V.
  • 11
  • 1
  • AFAIK there is only a HTTP_HOST server variable and no HTTPS_HOST (and https would never be present in the plain HTTP virtual host running on port 80)... – HBruijn Jan 27 '15 at 14:19

0 Answers0