Steffen Müller's TYPO3 blog

July 31, 2008

Nested domains in a single TYPO3 pagetree

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 = http://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.

Comments

  1. Steffen Kamper wrote on August 26, 2008 at 16:38

    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 :(


Leave a comment:

(will not be published)

yes no

About this site

At the moment, T3node is a TYPO3 blog by Steffen Müller. Beside TYPO3, technical and nontechnical topics about free software and the internet are discussed.

This blog is also a personal survey about what motivates me to write this blog and what issues are worth writing. Statistically, my motivation to do this is probably to

1. express myself
2. connect with other people
3. share knowledge with other people

All contents are distributed under the Creative Commons Attribution - NonCommercial - ShareAlike 3.0 Unported licence.

About other sites