[TYPO3] CoolUri problem with subdirectory

Florian Klug flurl at flologics.info
Tue Sep 9 14:16:36 CEST 2008


Hi Jan,

thanks for your help.
On Monday 08 September 2008 21:44, Jan Bednarik wrote:
> Hi,
[...]
> so, REQUEST_URI is used only when Typo3 doesn't set siteScript, which
> happens for to me unknown reason.
>
> It's set by:
>
> this->siteScript = t3lib_div::getIndpEnv('TYPO3_SITE_SCRIPT');
>
> which is said to be
>
> TYPO3_SITE_SCRIPT = [script / Speaking URL] of the TYPO3 website
>
> impl:
> substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'),strlen(t3lib_div::getI
>ndpEnv('TYPO3_SITE_URL')));
>

You're right, this->siteScript is set to false.
When opening www.wildpacher.at/cms/ TYPO3_REQUEST_URL and TYPO3_SITE_URL 
have both the value "http://www.wildpacher.at/cms/" and so the substr() 
returns false - which is what i would expect, since TYPO3_REQUEST_URL is 
based on TYPO3_REQUEST_HOST and REQUEST_URI.

But doesn't this happen for everyone else or is it a misconfiguration on my 
part?



>
> and it goes deeeeeper. I'd try to find out, why siteScript is empty.
> Request_uri is just a fallback.
>
> RealUrl uses just siteScript:
>
> // If there has been a redirect (basically; we arrived here otherwise
> than via "index.php" in the URL) this can happend either due to a
> CGI-script or because of reWrite rule. Earlier we used
> $GLOBALS['HTTP_SERVER_VARS']['REDIRECT_URL'] to check but...
> 		if ($this->pObj->siteScript && substr($this->pObj->siteScript, 0, 9)
> != 'index.php' && substr($this->pObj->siteScript, 0, 1) != '?') {


More information about the TYPO3-english mailing list