Under construction - work in progress

This description is obsolete and must be changed for version 4.5.107

Customize default http:/https: behaviour (copia 1)

Actual default schema (as of TYPO3 4.5.40) for all pages is very simple: if you are generating links from an http: page, all generated links will be to http:, otherwise they will be https:.

This means, if you have a normal situation in which only some pages or some sections are protected by SSL, you have to set manually the schema (or protocol) for every single page in the site, otherwise pages will always be called with the same schema of the page which is generating links.

So, we though about a different way of managing the problem.

Global parameters

A parameter has been added in config_default.php, and has been integrated in the installation tool:

$TYPO3_CONF_VARS['FE']['httpDefaultBehaviour']

This parameter sets front end HTTP/HTTPS behaviour when page protocol is set to default

  •  0: keep current page scheme (TYPO3 default)
  •  1: Standard default is HTTP
  •  2: Standard default is HTTPS
  •  3: inherit from previous levels (first non-default declaration found going up in the pages/sysfolders hierarchy
  • 4: answer to http or https requests, but generate http links to this page
  • 5: answer to http or https requests, but generate https links to this page

Also sysfolders may manage the default schema. This was added because in this way sysfolder may set default behaviour to be inherited by existing children pages.

Page parameters

Each page schema may be set according to these values:

  •  0: Global default
  •  1: Page is HTTP
  •  2: Page is HTTPS
  •  3: page inherits schema from previous levels (first non-default declaration found going up in the pages/sysfolders hierarchy
  • 4: page answers to http or https requests, but links to this page must be generated as http
  • 5: page answers to http or https requests, but links to this page must be generated as https

Rominder: also sysfolders pages may manage the default schema. This was added because in this way sysfolder may set default behaviour to be inherited by existing children pages.

Practically speaking:

  • if you have a site completely http: (or completely https:), force general default to 1 (or 2) and leave all pages with standard behaviour.
  • if you have a site with only a few pages using https:, keep the general default to 1, keep all pages with default protocol and set the schema to https: only for needed pages.
  • if you have all site which must be http:, and some sections which must be https:, set general default to 3, then set the site root page to http: schema, and set schema to https: on pages (or parent pages) which need https: protocol.

If, for some pages, it would be better to use https but usage of http will not be critical for security of informations and will not justify a redirect to a https page (or there is a client not able to be redirected), set schema on that page to 4.

At the opposite, if, for some pages, it would be better to use http but usage of https will not enforce security of informations and will not justify a redirect to a http page (or there is a client not able to be redirected), set schema on that page to 5.