That is one way to accomplish it.
another would be to use htaccess to force a https redirect or to add php coed to the page to check for https.
see the first 2 answers to this post at stack overflow for examples:
http://stackoverflow.com/questions/85816/how-can-i-force-users-to-access-my-page-over-https-instead-of-http