Project

General

Profile

Actions

Bug #18754

closed

improved 404 pagenotfound_handling not working for certain requested URLs/resources

Added by Matthew Kennewell about 16 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2008-05-06
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When using default TYPO3 .htaccess file and with or without 'simulate static documents' it appears that 404 pagenotfound_handling works only for requested files:

- that have .html as the file suffix
- and the file being called is requested from the root of a typo3 site, i.e. www.domain.com.au/file.html

If 'file.html' exists, page is shown

If 'wrongfile.html' does not exist then correct 404 handling takes place
correctly, due to function '$this->checkAndSetAlias()'

The '404 pagenotfound_handling' feature fails to show the 404 headers for the following requested resources:

- www.domain.com.au/file.htm
- www.domain.com.au/file.pdf

- www.domain.com.au/folder/
- www.domain.com.au/folder/file.html
- www.domain.com.au/folder/file.pdf

When the above requested resources fail, the browser is given a 200 OK http header and is shown the home page of the website with the requested resources URL remaining in the browsers address bar. This could be due to $this->id being 'false' and then $this->id is set to '0' in function 'setIDfromArgV()'.

My suggested code to patch class.tslib_fe.php works on the premise that $this->TYPO3_CONF_VARS['FE']['pageNotFound_handling'] value is TRUE, but perhaps the TYPO3 404 handling should still work when $this->TYPO3_CONF_VARS['FE']['pageNotFound_handling'] is FALSE and therefore still show 404 headers and redirect to home page/ root page of website.

Please see attached file(s) class.tslib_fe.modified.php.txt & class.tslib_fe.orig.php.txt to review suggested code as a basis idea working towards possible patching of /typo3/sysext/cms/tslib/class.tslib_fe.php

(issue imported from #M8343)


Files

class.tslib_fe.modified.php.txt (162 KB) class.tslib_fe.modified.php.txt Administrator Admin, 2008-05-06 17:00
class.tslib_fe.orig.php.txt (162 KB) class.tslib_fe.orig.php.txt Administrator Admin, 2008-05-06 17:01
class.tslib_fe.modified.php__updated.txt (162 KB) class.tslib_fe.modified.php__updated.txt Administrator Admin, 2008-05-22 04:04
effects_on_this-id_using_default_class.tslib_fe.php.txt (2.88 KB) effects_on_this-id_using_default_class.tslib_fe.php.txt Administrator Admin, 2008-05-29 14:36
effects_on_this-id_using_modified_class.tslib_fe.php.txt (2.25 KB) effects_on_this-id_using_modified_class.tslib_fe.php.txt Administrator Admin, 2008-05-29 14:36
class.tslib_fe.original.php (198 KB) class.tslib_fe.original.php original file from typo3_src-4.5.29 source Matthew Kennewell, 2013-09-12 09:55
class.tslib_fe.modified.php (199 KB) class.tslib_fe.modified.php modified version placed in typo3_src-4.5.29 source Matthew Kennewell, 2013-09-12 09:55

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #21852: PageNotFound_handling works incorrectlyRejected2009-12-13

Actions
Related to TYPO3 Core - Bug #58728: Regression: unaccessible protected section with shortcut in rootlineClosed2014-05-12

Actions
Actions

Also available in: Atom PDF