Custom HTTPS Url Routing
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.
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
How would I go about enabling SSL for the entire site. Is that a backend setting or a config?
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 also use the following SQL in the database which doesn't require a code release:
update sf_page_data set require_ssl = 1