config.baseURL does not support stdWrap or copying of Objects
It is not possible to use stdWrap with baseUrl or copy the content of another COA as baseurl value (e.g. from a PHP_SCRIPT). This is necessary when using realurl in a multidomain environment.
The only solution now is to create conditions for every domain, which can be annoying and lead to strange beahvoiur when mistaking.
(issue imported from #M9212)
#2 Updated by Daniela Waranie over 9 years ago
The related issue (0007937) has been closed/resolved, but without new code.
1) Use a typoscript condition for each domain. E.g.
[globalString = ENV:HTTP_HOST=sub1.mydomain.com]
config.baseURL = http://sub1.mydomain.com/
2) Make a refactoring on "how 'config' and page-specific config-objects like 'page.config' are merged." and add stdWrap as mentioned by Michael Stucki to have userFunc (USER_INT).
3) Create typo3 domain records for each domain (manually or programmatically) and creat an external typoscript file (with conditions for each domain) each time a typo3 domain record was added (automatically).
Note the patch provided in 0007937 do not work when caching is enabled.
#3 Updated by Jo Hasenau over 9 years ago
IMHO 1) is not a workaround but currently the official way to go, since it is the only way to get properly cached results for different domains.
2) is not a workaround but a different solution, which would still not solve the caching problem
3) Would be just a kind of wizard for lazy admins, so no workaround, since it would use the same techniques
I really don't get why one should not be able to add the necessary lines of TS manually, since usually you don't get too many new domains and/or domain changes at once, do you?
#4 Updated by Daniela Waranie over 9 years ago
2) The page will be partially-cached and the TS-Base-Tag part is when using USER_INT not cached.
3) If you have a huge amount of subdomains (in my case 50k changes in 6 month) you should not try to manage the typoscript manually. To have such large typoscript condition list in your setup is a bad thing (even when it is auto generated is not the optimum). This is better than 1).
From my point of view: 2) is the best.