Jul. 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 = 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.

--> Back to the list of articles

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

  2. durtro wrote on March 4, 2009 at 20:23

    Where can I find this check flag?

    Thank you!

  3. Steffen Müller wrote on March 4, 2009 at 21:33

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


Leave a comment:

(will not be published)

CAPTCHA image for SPAM prevention

If you can't read the captcha word, please click to load a new image.
(You need Javascript turned on. Otherwise press the submit button and wait until the page has reloaded.)