[TYPO3-english] Re: typoLink_URL, forceAbsoluteUrl, and SEO friendly URLs

Bernhard Schenkenfelder bernhard at schenkenfelder.co.at
Mon Dec 22 06:18:12 CET 2014


Here's the complete file:

<?php

$TSFE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController', $TYPO3_CONF_VARS);
$TSFE->connectToDB();
$TSFE->initFEuser();
$TSFE->checkAlternativeIdMethods();
$TSFE->clear_preview();
$TSFE->determineId();
$TSFE->initTemplate();
$TSFE->getConfigArray();

$conf['parameter'] = $_GET['id'];
$conf['forceAbsoluteUrl'] = true;
$cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer');

header('Location: ' . $cObj->typoLink_URL($conf), true, 302);

In other words, I call (on the front end) a URL like http://10.0.0.82/typo3/index.php?eID=my_redirect&id=35. The above script redirects the user to http://10.0.0.82/typo3/index.php?id=35 instead of Instead of http://10.0.0.82/typo3/features.html


More information about the TYPO3-english mailing list