Change 404 error page

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Wed Jun 19, 2013 9:00 am
Reply with quote
Report this post
Hi there,

We have a 404 error page designed in html, how could we change the error page used for default in this template for our own one?

Thank you!
User avatar
Expert Boarder

GK User
Wed Jun 19, 2013 9:03 am
Reply with quote
Report this post
You can only modify general error page in file error.php inside template directory. Joomla! don't use different error pages depends of error number there is only one layout but different text.
User avatar
Platinum Boarder

GK User
Wed Jun 19, 2013 9:32 am
Reply with quote
Report this post
Do you have an idea which line we have to modify to add our html error custom page?
User avatar
Expert Boarder

GK User
Thu Jun 20, 2013 7:58 am
Reply with quote
Report this post
All changes you can make in error.php file because Joomla! will use only that file to display errors. I don't know any way to add own HTML only for one particular error code.
User avatar
Platinum Boarder

GK User
Thu Jun 20, 2013 3:59 pm
Reply with quote
Report this post
I can apply the same html file to all errors. Just I am not sure which line modify in error.php to add the url where my custom html page is located.

Thank you.
User avatar
Expert Boarder

GK User
Fri Jun 21, 2013 10:57 am
Reply with quote
Report this post
if you want to use your own error html page you can try to replace the whole content of the error.php file with this code:

Code: Select all
<?php

header("Location: YOUR_ERROR_PAGE_ABSOLUTE_URL");

// EOF


where YOUR_ERROR_PAGE_ABSOLUTE_URL is an absolute URL to your HTML error page i.e. http://yourdomain.com/error.html
User avatar
Administrator

GK User
Fri Jun 21, 2013 5:49 pm
Reply with quote
Report this post
Thank you!
User avatar
Expert Boarder


cron