Thanks for sharing it with us Charles. You can also redirect non-secure urls to secure links by adding one of the following directives to .htaccess file:
orCode:RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Code:RewriteEngine On RewriteCond %{SERVER_PORT} !443 RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}