millsy007
11-24-2009, 05:00 PM
Hi
I am using secure socket layer on the checkout pages of my site.
This works fine when a user goes on http://www.example.com/checkout.aspx
However when I was testing my site I went on http://example.com/checkout.aspx the user gets the security warning in the browser about the certifcate not matching.
Is there therefore a way to enforce the www. part of the address for my checkout page. The code I currently have for the ssl is:
protected void Page_Load( object sender , EventArgs e )
{
if (!Request.IsSecureConnection)
{
Response.Redirect(base.UrlBaseSSL);
}
}
public string UrlBaseSSL
{
get { return Request.Url.AbsoluteUri.Replace( @"http://" , @"https://" ); }
}
I am using secure socket layer on the checkout pages of my site.
This works fine when a user goes on http://www.example.com/checkout.aspx
However when I was testing my site I went on http://example.com/checkout.aspx the user gets the security warning in the browser about the certifcate not matching.
Is there therefore a way to enforce the www. part of the address for my checkout page. The code I currently have for the ssl is:
protected void Page_Load( object sender , EventArgs e )
{
if (!Request.IsSecureConnection)
{
Response.Redirect(base.UrlBaseSSL);
}
}
public string UrlBaseSSL
{
get { return Request.Url.AbsoluteUri.Replace( @"http://" , @"https://" ); }
}