/ Published in: PHP

<p>TYPO3 pageNotFoundHandling with determination of 404 and 401/403 stats. </p>
<p>Modify LOGIN_URL and NOTFOUND_URL !</p>
<p>Save as pageNotFoundHandling.php and point to this from Install Tool setting.</p>
<p>[FE][pageNotFound_handling] = USER_FUNCTION:fileadmin/scripts/pageNotFoundHandling.php:user_pageNotFound->pageNotFound</p>
<p>Enable cURL by setting [SYS][curlUse] = 1 at Install Tool</p>
<p>cURL must provide from system !</p>
<p>To get redirected after login to the request page, you have to use 'defined by GET/POST-Vars' at felogin redirect mode</p>
<p>Modify LOGIN_URL and NOTFOUND_URL !</p>
<p>Save as pageNotFoundHandling.php and point to this from Install Tool setting.</p>
<p>[FE][pageNotFound_handling] = USER_FUNCTION:fileadmin/scripts/pageNotFoundHandling.php:user_pageNotFound->pageNotFound</p>
<p>Enable cURL by setting [SYS][curlUse] = 1 at Install Tool</p>
<p>cURL must provide from system !</p>
<p>To get redirected after login to the request page, you have to use 'defined by GET/POST-Vars' at felogin redirect mode</p>
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php class user_pageNotFound { function pageNotFound($param, $ref) { $url = LOGIN_URL."?redirect_url=" . $param["currentUrl"]; } else { $url = NOTFOUND_URL; } $strCookie = 'PHPSESSID=' . $_COOKIE['PHPSESSID'] . '; path=/'; if ($contents) return $contents; else return FALSE; } } ?>
Comments
