I would like to test on load if the current URL is SSL or not, if so redirect to SSL. What's the best approach? There are pages that will not require SSL.
Thanks!
Printable View
I would like to test on load if the current URL is SSL or not, if so redirect to SSL. What's the best approach? There are pages that will not require SSL.
Thanks!
Request.IsSecureConnection will return true or false depending on whether you're on a secure page or not. If it isn't, then you will need to redirect the user.
Response.Redirect("https://" + theRestOfTheUrl)
Thanks again!
No problem. :)