Hello. Thanks for visiting.

Have questions about Server Intellect?

I'm here to help.

Call us toll free at 1-855-850-HOST(4678)

Coupon code copied
Server Intellect
(855) 850-HOST

Toll Free 24/7/365        (4678)

Get help from a Microsoft Certified Engineer.

Intellect Connect

Technical problem with your Windows Hosting?

Let our Microsoft Certified experts handle the problem for you.
Chat Now

Programmatically Force a Webpage to use SSL

You can programmatically force your webpage to use SSL by using the following codeĀ in your page:

VB.NET

If (Request.ServerVariables("HTTPS") = "off") Then
Response.Redirect("<a href="https://www.yourdomain.com/">https://www.yourdomain.com/</a>")
End If


C#

if (Request.ServerVariables["HTTPS"] == "off")
{
Response.Redirect("<a href="https://www.yourdomain.com/">https://www.yourdomain.com/</a>")
}

Interested in letting our experts solve your IT problems for you?
Get a free, no-obligations consultation with one of our experts today!

Call us at (855) 850-HOST

Chat Now

Start Your Order

X

This form does not accept free e-mail accounts. Please enter a business e-mail to submit it.

Submit Form Cancel

Please wait...

Submitting your info. This may take less than a minute.