I have a webserver "web01" hosting multiple domains on 1 IP. I have a virtual hosting setup.
One of the virtual hosts listens on port 443 and others on port 80.
I want to redirect port 443 for server https://mail.domain.com to another server on IP 172.17.1.102. The server at 172.17.1.102 is configured properly to listen for port 443 webmail.
I create a Virtual host.
RewriteRule ^(.*)$ https://mail.domain.com$1
Then I change the hosts file to point mail.domain.com to 172.17.1.102
My problem is, if I redirect on port 80 to port 80, It works fine but when I redirect on 443 to 443, it breaks www.techdomain.com
and the redirect for mail.domain.com does not work either.