This blog is intended for my documentation on System Administration and Network Administration for my future reference. Hope this blog will also be a good use to you.
RewriteEngine onRewriteCond %{SERVER_PORT} !^443$RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]