48470

Static Publishing and HTTPS

Following this question : Static Publishing in Silverstripe on Large Sites

We've been implementing the module from this fork (https://github.com/Focus-Flow/silverstripe-staticpublishqueue/) and it's working great locally. We have done some modification to implement our own categories page, but nothing special.

The only issue is now when we test on our server, which use https rather than http in local, nothing is working anymore. I've been trying to change a couple of thing in the FileSystemPublisher.php file to use https rather than http, but it's not doing anything.

An other thing, and it might be linked, when I go in the admin backend of our subsites, all the page links in the edit page are in "http" and apparently there is a https redirection on the server.

So I guess I have two questions :

    <li>

    How to make static publishing queue work with https ?

    </li> <li>

    How to make silverstripe understand that all of the website page should be in https and not in http, so it shows this way in the admin backend ?

    </li> </ul>

    Thanks in advance.

    Answer1:

    Subsite has a method called absoluteBaseURL(), so you might try this in your Page_Controller::init():

    $currentSubsite = Subsite::currentSubsite(); Director::setBaseURL($currentSubsite->absoluteBaseURL());

    Of course you need to configure Subsite's Domains including https

Recommend

  • Unable to install breakpoint in Eclipse: Absent Line Number Information
  • Handling exceptions in a class library enveloping a device driver
  • Unable to gem install nokogiri
  • Chrome breakpoint on radio doesn't fire
  • Negated scanset in fscanf and EOF
  • php show all images in directory and sort by last modified
  • Creating a C++ function that calls other Lua function
  • Why isn't my “Fizz Buzz” test in R working?
  • SQL - Select lowest values with group by and order by?
  • How can I extend PHP DOMElement?
  • Cypher - matching two different possible paths and return both
  • Problems with toDataURL HTML5 other ways to get canvas data?
  • Django foreign key drop down
  • Validate jQuery plugin, field not required
  • MS Access - How to change the linked table path by amend the table
  • Insert new calendar with SyncAdapter- Calendar API Android
  • Django simple Captcha “No module named fields” error
  • Python CGI os.system causing malformed header
  • formatting the colorbar ticklabels with SymLogNorm normalization in matplotlib
  • Projection media query: browser support and workarounds?
  • Display issues when we change from one jquery mobile page to another in firefox
  • NetLogo BehaviorSpace - Measure runs using reporters
  • Different response to non-authenticated users and AJAX calls
  • C# - Serializing and deserializing static member
  • Bug in WPF DataGrid
  • recyclerView does not call the onBindViewHolder when scroll in the view
  • Incrementing object id automatically JS constructor (static method and variable)
  • WinForms: two way TextBox problem
  • htaccess rewriting URLs with multiple forward slashes
  • Arrow is showed instead of the material design version hamburger icon. Why doesn't syncState in
  • Display Images one by one with next and previous functionality
  • Web-crawler for facebook in python
  • Calling of Constructors in a Java
  • Traverse Array and Display in markup
  • Transpose CSV data with awk (pivot transformation)
  • Data Validation Drop Down Box Arrow Disappearing
  • A cron job substitute?
  • KeystoneJS: Relationships in Admin UI not updating
  • trying to dynamically update Highchart column chart but series undefined
  • Why can't I rebase on to an ancestor of source changesets if on a different branch?