Typically I should be able to add the below code, to properly redirect 404 errors to a custom page (joomla article) and tell the browser (and search engines) that the page was not found (instead of giving them a confusing soft 404 error with status 200).
if (($this->error->getCode()) == '404') {
header("HTTP/1.0 404 Not Found");
echo file_get_contents(JURI::root().'/404');
exit;
}
Why close my topic??? Nothing is solved!!!
The above code doesn’t work in your template because it’s being ignored. the entire error.php file is being ignored.
How do I circumvent your template’s error handling?
-
This reply was modified 6 years, 7 months ago by mpiprojects. Reason: topic closed without support solution