Implemented replacement of http protocol if current connection is https - Issue 30587

Fixed issue with https when $live_site is set to a http:// URL