Today I caught a bug with my 404 page redirecting.
If I have not existing page like this https://domain.com/blablapage
, redirecting to 404 is working all good.
But if user go to url https://domain.com/blablapage/onemorepage
, Joomla not redirecting him to 404, but open main page with any of menu item.
My custom error.php starting with:
if (($this->error->getCode()) == '404') {
header('Location: ' . JRoute::_('index.php?option=com_content&view=article&id=53')); // Url to 404 page
exit;
}