Force one page to be https

I am trying to make one page on my server be secure. I have successfully installed an SSL certificate. For example, when a user types in http://example-site.com/index2.php I want them to be 'forced' to https://example-site.com/index2.php. At the moment they can type http://example-site.com/index2.php or https://example-site.com/index2.php and they get the same page (except in the 2nd case it is secure, of course). I figure there must be a way of doing this in WebMin or VirtualMin interface, but I can't see anywhere obvious.

Status: 
Active

Comments

Probably the easiest way to do this is to edit the PHP code for index2.php and make it redirect to the https: URL if not in SSL mode. You can detect this with the PHP variable $_SERVER['HTTPS']