More in this section
Forums / Migrating from 3.x to the latest Sitefinity version / sitefinity 4.x ProcessSSLRedirect?

sitefinity 4.x ProcessSSLRedirect?

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Anca
    Anca avatar
    4 posts
    21 Apr 2010
    17 Jan 2012
    Link to this post

    In Sitefinity 3.7 there was ProcessSSLRedirect of Telerik.Cms.Web.CmsHttpModule that we could override and control HTTP/ HTTPS regardless page Require SSL property. We used this because part of site pages were supposed to work under HTTPS only in specific cases (e.g. after user has logged in) while in other cases they were supposed to work under regular HTTP. So, as you can see we could\n't use Require SSL, property which was always redirected specific page to HTTPS.

    Does Sitefinity 4.x has this ProcessSSLRedirect (or similar) method available that can be override for controlling HTTP / HTTPS over a sitefinity 4.x site?

    If not, which is the best solution for controlling HTTP / HTTPS regardless Require SSL, which will force specific page to always work under HTTPS?


  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    18 Sep 2017
    19 Jan 2012
    Link to this post

    To use SSL is to install a SSL certificate in IIS and use SSL across the site, however regarding the use of both secured and unsecured pages Sitefinity doesn`t provide a specialized way to do this. This should be done as in standard .net web application and I was searching for a good way to do and found the redirection with HttpContext.Current.Request.

    ublic static string GetSiteRoot()
      string port = System.Web.HttpContext.Current.Request.ServerVariables["SERVER_PORT"];
      if (port == null || port == "80" || port == "443")
        port = "";
        port = ":" + port;
      string protocol = System.Web.HttpContext.Current.Request.ServerVariables["SERVER_PORT_SECURE"];
      if (protocol == null || protocol == "0")
        protocol = "http://";
        protocol = "https://";
      string sOut = protocol + System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + port + System.Web.HttpContext.Current.Request.ApplicationPath;
      if (sOut.EndsWith("/"))
        sOut = sOut.Substring(0, sOut.Length - 1);
      return sOut;

    All the best,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered