Here is the situation. I have a website that has two domain names. Each domain name points to the same server. Each domain may access http and https and serves the same content. Some users use one domain and others use the other domain. They each serve the same content.

I am looking for a means to redirect each domain request on http to its corosponding https page.

http://domain1.com ---> https://domain1.com
http://domain2.com ---> https://domain2.com

Typically this action could be performed for a single url with a .htaccess modification using:
Code:
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
Due to the technical setup of the server, I am unable to use {HTTP_HOST} When called it returns "example.subsite" and contains neither of the two domain names.

I'm thinking using a php redirect in the header might be a means to accomplish this.

Anyone able to offer any ideas?

I've done tons of searching but not been able to find any means to do this other than using HTTP_HOST.