Typo3 Multidomain RealURL
Ever installed the RealURL Extension on a Multidomain Typo3 Installation and had difficulties running it?
Here you can find a short tutorial how to set it up right.
Open typo3conf/localconf.php and add following lines:
// realUrl Domains $aPID = array( 'www.domain.com' => '1', 'www.domain2.com' => '2' );
After add following to typo3conf/realurl_autoconf.php:
'pagePath' => array( 'type' => 'user', 'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main', 'spaceCharacter' => '-', 'languageGetVar' => 'L', 'expireDays' => 3, //'rootpage_id' => '1', 'rootpage_id' => $aPID[$_SERVER['HTTP_HOST']], 'disablePathCache' => 1, 'postVarSet_failureMode' => '', ),
After you edited realUrl_autoconf.php and localconf.php everything should work smoothly.
Additionaly you should prepare your .htacces as follows:
RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [QSA,R=301,L]
RewriteCond %{HTTP_HOST} ^domain2.com$ [NC]
RewriteRule ^(.*) http://www.domain2.com/$1 [QSA,L,R=301]
Enjoy







