I’m trying to create a custom 404 page using an article. I edited the error.php file as follows and it does the trick — it redirects to the desired page:
<?php
defined('_JEXEC') or die;
if (($this->error->getCode()) == '404') {
header('Location: /index.php?option=com_content&view=article&id=349');
exit;
}
However, the article does not show up. If I load up the article from a menu bar (http://beta.cbtt.sk/index.php/404) it all displays OK. However, direct linking (http://beta.cbtt.sk/index.php?option=com_content&view=article&id=349) does not help.
Any ideas what might be wrong / needed to be done?