Hey guys, I am hosting my own server and have two ip addresses for it (one for people connecting from within intranet and one for people connecting from outside) and I have two dynamic dns's redirecting to these ip's. I have just installed/setup SSL on my apache2-based server, and am trying to use .htaccess to force users to use https. I got it working using a statement like
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$https://mywebsite.dyn.site/$1 [R,L]
The problem is that since I have two separate domain names for the same website, that statement will redirect all traffic to one specific domain. I guess what I'm asking is whether there is a.) a way to put a conditional if statement to check for their ip, or preferably b.) a way to remove the "mywebsite" from being hardcoded, and putting a variable for whatever the user enters.
Any help would be greatly appreciated.