Skip to main content
Some reformatting
Source Link
mickmackusa
  • 4.8k
  • 4
  • 18
  • 48

You should be able to adjust the error.php file to set the header either with the

1. Joomla way:

$app = JFactory::getApplication();

$app->setHeader('HTTP/1.1', '404 Not Found',true);

$app->sendHeaders();

2. PHP way
header('HTTP/1.1 404 Not Found', true, 404);

  1. Joomla way:

     $app = JFactory::getApplication();
    
     $app->setHeader('HTTP/1.1', '404 Not Found',true);  
    
     $app->sendHeaders();
    
  2. PHP way

     header('HTTP/1.1 404 Not Found', true, 404);    
    

You should be able to adjust the error.php to set the header either with the

1. Joomla way:

$app = JFactory::getApplication();

$app->setHeader('HTTP/1.1', '404 Not Found',true);

$app->sendHeaders();

2. PHP way
header('HTTP/1.1 404 Not Found', true, 404);

You should be able to adjust the error.php file to set the header either with the

  1. Joomla way:

     $app = JFactory::getApplication();
    
     $app->setHeader('HTTP/1.1', '404 Not Found',true);  
    
     $app->sendHeaders();
    
  2. PHP way

     header('HTTP/1.1 404 Not Found', true, 404);    
    
Source Link

You should be able to adjust the error.php to set the header either with the

1. Joomla way:

$app = JFactory::getApplication();

$app->setHeader('HTTP/1.1', '404 Not Found',true);

$app->sendHeaders();

2. PHP way
header('HTTP/1.1 404 Not Found', true, 404);