stmllr.net

Nested domains in a single TYPO3 pagetree

by on stmllr.net

A common scenario in maintaining websites is to have a handful of websites, each with little content and a single person who is in charge of the content. Why not throw everything into a single TYPO3 installation?

Maintaining multiple domains inside one TYPO3 instance is possible. But it can be tricky, especially when using RealURL and domains are nested. You need to carry together the neccessary configuration options. Until today this is not as easy as you might think. The following prerequisites are essential, additional to your usual setup:

  • Use TYPO3 Version 4.2 (because HMENU does not use typolink in >=4.1)
  • use RealURL Version >=1.4.0
  • setup TypoScript of all rootpage templates (the first three items of course can be merged into a global template):

  • config {
      simulateStaticDocuments = 0
      tx_realurl_enable = 1
    # render internal links between domains
      typolinkCheckRootline = 1
      baseURL = mydomain.com
    }
  • set domain record in every rootpage
  • set the rootlevel flag in the rootpage templates
  • set the "Is root of website" flag in the rootpage properties. This is essential for nested domains.
  • set the rootpage_id for every domain in the RealURL configuration part in typo3conf/localconf.php:

  •  $TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
    'www.foo.com' => array(
    'pagePath' => array(
    'rootpage_id' = 1234
    ...
    ),
    'www.bar.com' => array (
    'pagePath' => array(
    'rootpage_id' = 5678
    ...
    ),

However, you could still run into problems. Keep your eyes open for recent patches in the TYPO3-core list and related bugs.

Tags

Comments

  1. Steffen Kamper

    Hi Steffen,

    thanks for the tip. Unfortunally there seems missing a recursive check, as this works only with pages having this flag. If only parent page has "is root" it doesn't work :(

  2. durtro

    Where can I find this check flag?

    Thank you!

  3. Steffen Müller

    Steffen means the "Is root of website" flag in the page properties.