Hello,
I want to show a 404 Not Found Page if the URL is really not on the server.
For e.g example.com/iamnotafile This shows a blank page instead of 404 page. How do i show a 404 Page?
Here's what I understand.
In file_download.php
This calls the output404() function in coreFunctions.class.php
This is the 404 function. Shall I add redirect to error page?
Please give me an example.
I want to show a 404 Not Found Page if the URL is really not on the server.
For e.g example.com/iamnotafile This shows a blank page instead of 404 page. How do i show a 404 Page?
Here's what I understand.
In file_download.php
Code:
// could not load the file
if (!$file)
{
coreFunctions::output404();
//coreFunctions::redirect(coreFunctions::getCoreSitePath() . "/index." . SITE_CONFIG_PAGE_EXTENSION);
}
Code:
static function output404()
{
header("HTTP/1.0 404 Not Found");
exit;
}
Please give me an example.