making the base url conditionally https