[TYPO3] Dynamic Setting for config.baseURL

Joerg Wagner jwagner at digilog.de
Wed May 3 21:14:46 CEST 2006


Just to have this correct:

[globalString = ENV:HTTP_HOST=*example.com]
config.baseURL = http://example.com/
[globalString = ENV:HTTP_HOST=*example.org]
config.baseURL = http://example.com/
[globalString = ENV:HTTP_HOST=*example.net]
config.baseURL = http://example.net/
[global]

Explanation:
- ENV:  (or ENVI:) in front of HTTP_HOST is recommended.
- http:// in front of example.com is NEEDED!!! (otherwise the resulting base 
tag will not work)
- / after example.com is NEEDED!!! (otherwise openpic links on clickable 
images will not work, because their URLs will be degraded to something like 
http://example.comindex.php...)

--
Cheers,
Jörg Wagner
DigiLog multimedia


"Joerg Wagner - DigiLog multimedia" <usenet at digilog.de> schrieb im 
Newsbeitrag 
news:mailman.1.1146418409.5881.typo3-english at lists.netfielders.de...
> Thanks Christopher,
>
> works nicely. THX a lot!
> --
> Jörg Wagner
> DigiLog multimedia
>
>
> "Christopher" <bedlamhotel at gmail.com> schrieb im Newsbeitrag 
> news:mailman.9768.1146412347.29768.typo3-english at lists.netfielders.de...
> Hi Joerg,
>
> On 4/30/06, Joerg Wagner - DigiLog multimedia <usenet at digilog.de> wrote:
>> Hi all,
>>
>> is there a possibility in TS-Setup to set config props from Apache
>> environment vars?
>> In my case I need a dynamic setting for config.baseURL . Something like:
>>     config.baseURL = getenv:HTTP_HOST
>> (which does not work of course).
>
> This works (and should be practical unless there are _many_ domains
> pointing to the site--I have it in use in one place with, I think, 9
> domains...):
>
>
> [globalString = HTTP_HOST=*example.com]
> config.baseURL = example.com
> [globalString = HTTP_HOST=*example.org]
> config.baseURL = example.com
> [globalString = HTTP_HOST=*example.net]
> config.baseURL = example.net
> [global]
>
>
> -Christopher
> 





More information about the TYPO3-english mailing list