[TYPO3-english] PHP SCRIPT --- redirects on Typo3 with config.baseURL
Bjoern Pedersen
bjoern.pedersen at frm2.tum.de
Tue Feb 1 15:39:11 CET 2011
Am 01.02.2011 15:01, schrieb angel.garcia1 at ext.mpsa.com:
>
> Good afternoon,
>
> I create a function on php to probe HTTP origin to see if its Client-IP or
> X-BlueCoat
>
> header.php
> <?php
>
> $v = @$_SERVER["HTTP_X_BLUECOAT_VIA"];
>
> if (!$v) {
> echo "0";
> } else {
> echo "1";
> }
>
>
> ?>
>
> And now i need to get that var $y to redirect on my typo3 .
>
> My TS template
>
> ##Configuración
> require_once (t3lib_extMgm::extPath('zone','fileadmin/header.php'));
>
> [globalString=IENV:$v=0]
> config.baseURL = http:/domain.net.com
> [end]
>
> [globalString=IENV:$v=1]
> config.baseURL = http://domain.com
> [end]
>
>
>
> But it doesn´t work, any idea of how i can do it? It´s a little urgent.
>
> What i want if var=0 it´s intranet It use http:domain.net.com and if var=1
> it´s Client IP so it use domain.com
> Thank You very much for your help
Conditions on userfunctions work different:
You have to include your userfunction in localconf.php (or
ext_localconf.php of an extension(e.g. your "zone" extension). And the
userfunction should return true or false.
The condition is:
[userFunc = user_checkbluecoat()]
or you could try:
[globalString = IENV:_SERVER|HTTP_X_BLUECOAT_VIA =/some PCRE regexp/]
see
http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.3.2/view/1/4/
Björn
More information about the TYPO3-english
mailing list