added rewriting of protocol to https: