Activating the Extension:ref:

The HTTPS Enforcer extension is really just a “modularized” piece of code that checks the current requested page URL and forces a redirect depending on whether that URL is correct for the current page or not. As such, it is nothing more than a piece of PHP code with the designation “user” and “internal non-cached” (USER_INT) to the TYPO3 system.

Even if the HTTPS Enforcer extension is loaded, it is just being made “available”, it is not assigned or injected anywhere, yet. It is up to you to pick an appropriate spot to inject it. What is suggested here is to check every page and enforce the correct page access accordingly (encrypted for pages marked as “secure”, and unencrypted for pages not marked as “secure”). Thus a good spot to “inject” the HTTPS Enforcer would be your MAIN (rootpage) TypoScript template PAGE object, so that when your main PAGE object is getting worked up and rendered, the check and the possible redirect will happen.

  1. Login into the TYPO3 backend (administration) using the http://www.mydomain.org/typo3/ URL.
  2. In the core module menu select WEB > Template.
  3. In the page tree, click on the node that contains your site template.
  4. From the top-left drop-down menu, select Info/Modify.
  5. Click on the “Edit the whole template record” button at the end of the site.
  6. Select tab “Includes” and in the “Include static (from extensions)” part select Https Enforcer (https_enforcer) from the list of Available Items.
  7. Afterwards switch to the tab “General” and scroll down to the Setup section.
  8. Locate your main TypoScript PAGE object. It should be declared similarly to page = PAGE . One of the next TypoScript statements probably reads: page.10 = FLUIDTEMPLATE or something similar.
  9. Pick a numerical index right before the very first assignment in your PAGE object (so that the http/https check happens before a full page is rendered) and load the necessary Extbase Action Controller right in there: page.5 = USER_INT . See details on TypoScript configuration below.
  10. Click on Save to update your TypoScript configuration.

In effect, your TypoScript for the MAIN (rootpage) TypoScript setup section should look as follows:

page = PAGE
page.5 = USER_INT
page.5 {
  vendorName = TVogt
  extensionName = HttpsEnforcer
  pluginName = Pi1
  controllerName = Https
  switchableControllerActions {
    Https {
          1 = main
        }
  }
  userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
}