Best method to redirect from http to https


I've applied a https redirect following the instructions provided in the page below (I'm runing on a Linux server):

I want to know if there's a better way or if that code added in .htaccess is enough. I also want to know how to redirect to https only the pages that need the redirect -sites like Amazon and eBay only have it at the pages at which it's needed, so I presume that's standard.