[TYPO3] Complex RealURL setup

Dmitry Dulepov [typo3] dmitry at typo3.org
Sun Jun 8 17:49:51 CEST 2008


Hi!

The Plankmeister wrote:
> 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]

This is not RealURL setup, this is TS setup ;)

>    config.simulateStaticDocuments = 0

Not needed, it is 0 by default.

>    plugin.tx_realurl.appendMissingSlash = 1

Does not exist, has no effect, remove it.

> Then I have the following in my localconf.php:
> 
> $TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
>    '_DEFAULT' => array(

<skip>

> $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.

Well, this is expected behavior :D _DEFAULT must go after any other domain. But in your case _DEFAULT is the first one, so you always end up in using _DEFAULT. RealURL searches for the first matching domain name sequentally and _DEFAULT matches always! So you may define hundred domains after _DEFAULT and _DEFAULT will be the first picked up.

> Any advice? I'm stumped. RealURL is not easy to configure when you want 
> to do complex stuff :/

Start with reading part 1 of RealURL configuration ay my blog. Part 2 will be out next week, it will show you how to configure RealURL for your case.

-- 
Dmitry Dulepov
Learn more about TYPO3: http://typo3bloke.net/


More information about the TYPO3-english mailing list