Creating a custom 404 page for your Joomla site can be very interesting. For some sites, there can be quit some users who get to the error 404 page. If a user lands on your default error page, there is a good change he will leave your site. If you have an error page that has the same layout as your actual site, there is a good chance he will stay. So let's make a custom error page.
1. Copy the default page
The default error page in Joomla 1.5 is /templates/system/error.php. Just make a copy of this file to the root directory of your template (= /templates/yourtemplate/). Now you can change this file any way you like, so if you know php you can start changing it. The problem is that it won't be so easy to include modules like your menu, your search module or other modules. There is a way to do this, but it's a real pain. So let's try a different approach.
2. Create an error 404 article
Create a new article for your error page. Choose your section and category wisely, so that it doesn't show up as a normal article on your site. As content, you can chose whatever you would like to see on your error page. In my case, I just copied the text from the default Joomla error page and made a small modification to it. Save the article and make sure it's published.
3. Get the link to this article
In the Article Manager, you will see your new article in the list. In the last column, you will find the ID of your article. You need this for the link to your article. Just replace the domain and the ID in this link: http://www.example.com/index.php?option=com_content&view=article&id=136
If SEF is enabled, you can take the SEF url in stead of this one.
4. Include the content of this article in your error page
Now you will have to include the content of your article in the error page you've copied. Below I've put the contents of the default error page and I've added in red text, the lines you have to add. Of course you need to replace the link, with the one you've created. Don't forget the part at the bottom! After you have done this, you will have your custom error 404 page.































