How to redirect to https using .htaccess

If you’re looking for a quick and simple method to redirect your plain HTTP site visitors to the SSL edition without fancy server-side configuration (or asking your host for help), this can be easily done through the ubiquitous .htaccess file present and supported on most Apache-powered hosting services.