1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Custom HTTPS Url Routing

Custom HTTPS Url Routing

5 posts, 0 answered
  1. Apptain
    Apptain avatar
    30 posts
    Registered:
    20 Aug 2012
    04 Mar 2012
    Link to this post
    Is there a way that I can override Sitefinity's HTTP / HTTPS handling so that I can direct to HTTPS in my own URL routing?

    Right now if I try to access a page with HTTPS that is not set to Require SSL I am redirected to the HTTP version, but the only way I can edit a page that is HTTPS is to remove Require SSL, edit the page, and then turn HTTPs back on.
  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    16 Aug 2017
    07 Mar 2012
    Link to this post
    Hello,

    One option would be to enable SSL for the entire site including backend and frontend pages which should solve the issues with editing pages set as RequireSSL. However if you want to implement some custom logic (e.g. NAT) that would be a tough one, as there is no logic exposed for checking whether a certain page has RequireSSL set before the routes have executed the only plausible solution would be an HttpModule which will get the request once it's been processed by Sitefinity and check if the request is http or https and then redirect to the desired ports using NAT.

    All the best,
    Boyan Barnev
    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
  3. Apptain
    Apptain avatar
    30 posts
    Registered:
    20 Aug 2012
    07 Mar 2012
    Link to this post
    How would I go about enabling SSL for the entire site. Is that a backend setting or a config?
  4. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    16 Aug 2017
    08 Mar 2012
    Link to this post
    Hi,

    We have just replied to the support thread you had open for the same issue, you can check our response there. For your convenience please find our reply below as well:

    "Each Sitefinity page has a public property RequireSSL which can be set from the page's Title and Properties action menu, however if you want to set it in bulk the easiest approach would be through code:
    App.WorkWith().Pages()
                               .ThatArePublished()
                               .Where(p => p.Page != null)
                               .ForEach(p =>
                                           {
                                               p.Page.RequireSsl = true;
                                           }).SaveChanges();
    you can simply place the above sample on a WebForm in your project solution, build it and then navigate to the WebForm int he browser. Please make sure you're logged in Sitefinity with an administrative user as you'll be modifying the Pages properties."

    All the best,
    Boyan Barnev
    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
  5. Ben
    Ben avatar
    35 posts
    Registered:
    24 Jan 2011
    14 Mar 2012
    Link to this post
    You can also use the following SQL in the database which doesn't require a code release:

    update sf_page_data set require_ssl = 1

    We have to do this with every major code release where we're migrating our dev sitefinity DB to prod since our dev server doesn't have https or a cert installed. 
5 posts, 0 answered