[BUGFIX] TypoLink: absolute urls when installed in subfolder
authorNils Seinschedt <n.seinschedt@neusta.de>
Mon, 16 Jan 2012 09:59:46 +0000 (10:59 +0100)
committerXavier Perseguers <xavier@typo3.org>
Tue, 6 Mar 2012 08:49:32 +0000 (09:49 +0100)
commit1c3e89656ae587e7f420d9c9870ac87e44d0a71a
treebfc73ef178e3a341172b711f946aa0e66d666672
parent0b8e2e98f0a3aad5bc094455fb809aa725c173f5
[BUGFIX] TypoLink: absolute urls when installed in subfolder

If you have TYPO3 installed in a subfolder and a domain
record with that subfolder (localhost/subfolder/ for
example) TYPO3 only generates absolute links in the
frontend.

This is because the typoLink function compares the
HTTP_HOST var with the domainRecord. HTTP_HOST is in
this case "localhost", the domain record has the subfolder
attached. The subfolder needs to be there, as otherwise
t3lib_pageSelect::getDomainStartPage does not find the
start page anymore. typoLink should check for HTTP_HOST +
path of SCRIPT_NAME to determine which domain record
to use (same as getDomainStartPage already does).

Change-Id: I50fc642ca4fb4c4522e0fc1e2dc4a4c391f54e4f
Fixes: #33214
Releases: 4.5,4.6,4.7
Reviewed-on: http://review.typo3.org/9074
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/cms/tslib/class.tslib_content.php