Author: JamesSAEP | Posted on: 9/8/2008 2:10:00 PM | Views : 284

I'm trying to redirect the login page to require SSL using the code below.  Is there a way to have the " Response.Redirect("https://www.mysite.com/Member/Login.aspx");" redirect work so that I don't need to write my whole domain?  When testing on my local machine, I click my login link and it directs me to my hosted website.  I know I can type my local address (https://localhost/.../login.aspx) and it will work, but that is a pain. 
Also, is there a better way to achieve my goals:
 1. Require SSL
2. If user is authenticated, then take them to the http://~defalut.aspx page
Code-behind:

 public partial class Member_Login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       if (!(Request.ServerVariables["HTTPS"] == ""))
       &n ...

Go to the complete details ...