I want to create a action filter that will check the url, and if its not using Ssl, redirect to the same page but with SSL.
What is the best way of doing this?
Should I just check the RawUrl, and scan the string for https, and if its not there then do:
context.Response.Redirect(context.Request.RawUrl.Replace("http:", "https:"));