I am using IIS 7.5 and have a website setup with an SSL certificate. I am using Helicon Ape to redirect non HTTPS traffic:
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
This works perfectly for https://www.example.com and http://www.example.com
I have a second site setup in IIS that is bound to the IP address but without a host name. I use HTTP Redirect to send the traffic to https://www.example.com.
This works perfectly for http://1.2.3.4 but not for https://1.2.3.4 as the browser warns about the mismatching certificate.
Ideally I would like to prevent https://1.2.3.4 from responding, that way the Hacker Guardian PCI-DSS scan would pass. If it could successfully redirect to the domain name great, but not a deal breaker.
I don't think I can create a certificate for the IP address, I am hoping there is a configuration setting I can use to prevent this.
Any ideas?