[TYPO3-dev] config.baseURL & userFunc

Tomas Norre Mikkelsen tomasnorre at gmail.com
Wed Sep 28 18:46:23 CEST 2011


Hi,

I have a site which runs in 14language and 14deferent domains, so i want 
my config.baseURL to be dynamic.

I though of following:

TS:
includeLibs.serverinfo = fileadmin/serverinfo.php

temp.info = USER
temp.info {
   userFunc =user_serverinfo->main
}

config.baseURL < temp.info (not working cause userFunc cannot be applied 
to string function)

my fileadmin/serverinfo.php looks like this:

<?php
class user_serverinfo {
	function main($content, $conf) {
		$content.= "http://".$_SERVER['HTTP_HOST']."/";
		return $content;
	}
}
?>

Any hints on how to make the baseURL dynamic regarding the hostname.

I don't want a:

[globalString = ENV:HTTP_HOST=domain1.tld]
config.baseURL = http://domain1.tld/
[global]

[globalString = ENV:HTTP_HOST=domain2.tld]
config.baseURL = http://domain2.tld/
[global]

for every domain.

Hints?

-- 
Best Regards
Tomas Norre Mikkelsen
T3 Skin Team Member
Follow me at twitter.com/tomasnorre




More information about the TYPO3-dev mailing list