I have Apache 2.2 with mod_ssl and a bunch of sites in HTTPS on the same IP/port with VirtualHosting, so client must support SNI to connect to those virtual hosts.
I would like to configure my server the following way:
When a user types www.dummysite.com and his browser supports SNI (Server Name Indication), any HTTP request is redirected to https://
where an HSTS header is sent. But if the browser doesn't support SNI then the request is served by HTTP.
The above rule, stated as is, is actually a fallback rule for those people that still run old browsers, as Mozilla and Chrome don't have this problem, just to avoid leaving these users out of the site.
I would like to do this redirecting at the Apache config level, perhaps with a filter on the user agent. I wouldn't like to touch running applications except making sure that no direct http:// references are present (otherwise they imply a security warning)
[Edit] (while editing the question I forgot the question): what is the list of SNI-enabled user agents to redirect?