Bug #18803

pageErrorHandling doesn't work with relative files in a subfolder TYPO3 install

Added by Christoph Koehler about 12 years ago. Updated over 9 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


pageErrorHandling checks for the REQUEST_URL environment variable, which is the root domain, even if TYPO3 is installed in a subfolder. So relative files in fileadmin should be prefixed with http://domain.com/subfolder/, but are just prefixed with http://domain.com/, causing the relative file to not be found.

Need more feedback of possible pitfalls with this approach.

(issue imported from #M8441)

pageerrorhandling.diff View (591 Bytes) Administrator Admin, 2008-05-16 21:06

Related issues

Related to TYPO3 Core - Bug #18816: TYPO3_SITE_URL in t3lib_div::locationHeaderUrl to support TYPO3 installed in subfolders Closed 2008-05-19


#1 Updated by Christoph Koehler about 12 years ago

My bad, it checks for the TYPO3_REQUEST_HOST variable.

#2 Updated by Christoph Koehler about 12 years ago

Some more info:
My TYPO3 install on localhost is in a subfolder, so I have http://localhost/sub1/, http://localhost/sub2/, etc.
When I set my error page to fileadmin/404.html, it always tells me that http://localhost/fileadmin/404.html doesn't exist, which is of course true.

That's because TYPO3_REQUEST_HOST is just the domain name, not the site url.

#3 Updated by Peter Niederlag almost 10 years ago

TYPO3 install on localhost is in a subfolder
$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = 'READFILE:fileadmin/notfound.html';
-> everything works as expected for me.

Still reproducable?
Realurl enabled?

#4 Updated by Christoph Koehler almost 10 years ago

Seems to work now. It's only been two major versions since :)

#5 Updated by Chris topher over 9 years ago

Resolved, not reproducable.

Thanks for the feedback!

Also available in: Atom PDF