Menü schliessen
Created: March 29th 2012
Last updated: May 1st 2020
Categories: Typo3
Author: Marcus Fleuti

Typo3 RealUrl extension with multiple domains and root IDs

Tags:  realurl,  Typo3
Donation Section: Background
Monero Badge: QR-Code
Monero Badge: Logo Icon Donate with Monero Badge: Logo Text
82uymVXLkvVbB4c4JpTd1tYm1yj1cKPKR2wqmw3XF8YXKTmY7JrTriP4pVwp2EJYBnCFdXhLq4zfFA6ic7VAWCFX5wfQbCC

How to configure the Typo3 RealURL extension with a multiple domain/root tree configuration (and multiple root IDs)

Sometimes there are multiple webs configured in a single Typo3 instance using multiple page trees and root IDs. This solution describes how to configure the RealURL extension properly to work with multiple page trees.

Solution

Use the following lines in either localconf.php oder real_conf.php:

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['pagePath']['rootpage_id'] = 1; //the root pages ID
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.domain.de'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.domain2.de'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.domain2.de']['pagePath']['rootpage_id'] = 2; //overwrite root page ID with the one for this specific domain
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.domain3.de'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.domain3.de']['pagePath']['rootpage_id'] = 3;