Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
string newUrl = string.Concat("https://", HttpContext.Current.Request.Url.ToString().Replace("http://", string.Empty));
My theory: sometimes "http://" is found in the current request URL, and sometimes it is not. If you always replace it with nothing, and then prepend "https://", you'll always get what you want.