Hi All,
I have a slight problem in that my security certificate is only valid for my website in the following format https://www.tietie.co.uk. If a user enters on http://tieite.co.uk, then goes to the acount page (http://tietie.co.uk/account.aspx) they get a security cerficate warning. So I was thinking I could add something like below to ensure that the user hits my www address. My question is where should it go, maybe root.master? Or is there a better way to do this that I have overlooked?
//Make sure the user is visiting www.tietie.co.uk for https reasons
//Excluded when running locally
string sURL = Request.Url.ToString();
if (sURL.Contains("//localhost") == false && sURL.Contains("//www.") == false)
{
sURL = sURL.Replace("//", "//www.");
Response.Redirect(sURL, true);
}
Any thoughts or suggestions would be appricated!
Thanks
Rick