[TYPO3] Complex RealURL setup
The Plankmeister
plankmeister.n0sp4m at hotmail.com
Sun Jun 8 12:18:45 CEST 2008
Hi all RealURL experts!
I'm really chewing my knuckles about an issue with RealURL on my
multiple domain, multiple page-tree setup.
I have my domain, www.mydomain.com (not my real domain, but good enough
for this example) and I also have a subdomain, dev.mydomain.com.
In Typo3 I have two page trees at the root level, one for each domain.
In each root page I also have a domain record for that domain.
In my (global) RealURL setup, I have this:
[globalString= IENV:HTTP_HOST = www.mydomain.com]
config.baseURL = http://www.mydomain.com/
[end]
[globalString= IENV:HTTP_HOST = dev.mydomain.com]
config.baseURL = http://dev.mydomain.com/
[end]
config.simulateStaticDocuments = 0
config.tx_realurl_enable = 1
plugin.tx_realurl.appendMissingSlash = 1
Then I have the following in my localconf.php:
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
'_DEFAULT' => array(
'init' => array(
'enableCHashCache' => 1,
'appendMissingSlash' => 'ifNotFile',
'enableUrlDecodeCache' => 1,
'enableUrlEncodeCache' => 1,
),
'redirects' => array(),
'preVars' => array(),
'pagePath' => array(
'type' => 'user',
'userFunc' =>
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'expireDays' => 7,
'rootpage_id' => 9,
),
'fixedPostVars' => array(),
'postVarSets' => array(),
'fileName' => array(),
)
);
$TYPO3_CONF_VARS['EXTCONF']['realurl']['dev.mydomain.com'] =
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
$TYPO3_CONF_VARS['EXTCONF']['realurl']['dev.mydomain.com']['pagePath']['rootpage_id']
= 4;
$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = '/pagenotfound';
$TYPO3_CONF_VARS['FE']['pageNotFound_handling_statheader'] = "HTTP/1.1
404 Not Found";
Where the rootpage_ids are set correctly.
However, only the www.mydomain.com domain works. If I try to visit
dev.mydomain.com, I end up at www.mydomain.com.
If I "show" a page in the dev.mydomain.com page tree, I can then click
around in it quite happily. However, any 404 errors just show the "the
nearest matching page was..." error.
The 404 page for the www.mydomain.com domain works fine.
Any advice? I'm stumped. RealURL is not easy to configure when you want
to do complex stuff :/
//Plankmeister
More information about the TYPO3-english
mailing list