Custom 404 error page for Jooma

This is where I found out how to do it.

Click though to see full instructions.

  1. First let’s create an Uncategorized ‘404’ Article
    Add a comment that this is an error page.
    Create a link back to your main page.
    Save as an ‘uncategorized’ article in Joomla! to serve as your 404 Page.
  2. Create and copy a link to that new 404 Article.
    Create a menu item which links to the new 404 Article and ‘apply’ your changes. Then copy the URL information (index.php?optio…), set the menu item as ‘unpublished’ and close out of the menu editing page. You may want to paste the copied URL into Notepad or somewhere accessible for the time-being.
  3. Copy error.php to your Template’s Directory
    In your Joomla! installation copy the file error.php from the templates/system directory, to your Template directory. For example, if I was using a template named ‘Cleancloud’ I would copy the error.php file to the templates/cleancloud directory.
  4. This is for Joomla 1.7-2.5 only, modify error.php to Redirect 404 Errors to your 404 Article
    defined(‘_JEXEC’) or die;
    if (($this->error->getCode()) == ‘404’) {
    header(‘Location: /index.php?option=com_content&view=article&id=87’);
    Where the header is the article to link to.


About howlmc

50 something geek, who has owned way too many computers.
This entry was posted in Websites. Bookmark the permalink.