I've looked in the error.php file and I don't know what to do.
How/Where do I create a custom 404 page.
I searched the forum - no luck.
I've looked in the error.php file and I don't know what to do.
How/Where do I create a custom 404 page.
I searched the forum - no luck.
The link's instructions did not work.
SEF = yes
URL Rewriting = yes
Add suffix = no
I got the code displaying on the screen.
My "hidden menu" alias to the custom 404 page is:
what-were-you-looking-for
So what do I change?
This worked:
Given this global configuration:
SEF = yes
URL Rewriting = yes
Add suffix = no
Create an Article
Create Hidden Menu Item pointing to the Article Save - copy the menu alias - example: "what-were-you-looking-for"
Modify error.php
Just after:
defined('JEXEC' or die;
Add this one line of code:
if (($this->error->getCode()) == '404') {header('Location: http://www.mydomain.org/what-were-you-looking-for');
exit;
}
Thanks for your suggestions. I am glad that it worked.