Hostwinds Tutorials
Search results for:
Table of Contents
Tags: Joomla
This guide covers the steps to create a custom 404 error page for your Joomla! installation. You might want to do this, so the error page has useful site information.
This Guide will send a 200 HTTP code to browsers instead of a 404 (since we are creating a page for browsers to load)
If you are using Joomla 1.6, 1.7, 2.5, or 3.x please use this detection code:
if (($this->error->getCode()) == '404') {
header('Location: /index.php?option=com_content&view=article&id=75');
exit;
}
Replace the location information (index.php?option..) with the URL from the menu item you created.
If you are using Joomla 1.5 and below please use this detection code instead:
if (($this->error->code) == '404') {
header('Location: /index.php?option=com_content&view=article&id=75');
exit;
}
In the above steps, you create a custom article that shows up if the original article's URL fails. When doing this, the browser never actually sees a 404 error; it just sees a page created on Joomla! This can help keep your SEO from having the negative effects of a bad URL or just the plain "page not found" message.
If we can help you in any way, please submit a ticket or join us in a Live Chat anytime. We are available 24/7/365, and we are dedicated to our client's success; every client truly matters to us.
Written by Hostwinds Team / April 24, 2018