Custom error page soft 404 - Joomla! Forum - community, help and support


hello,
i trying implement custom error page in joomla 3.5.1 , php 7.0.6
this code works well, gives 302 server respons.

code: select all

<?php
   defined('_jexec') or die;
   if (($this->error->getcode()) == '404') {
      header('location: error-404');
      exit;}
?>


but when try 1 blank page (404 not found)

code: select all

<?php
   defined('_jexec') or die;
   if ($this->error->getcode() == '404') {
     header("http/1.0 404 not found");
     echo file_get_contents(juri::root().'error-404');
 exit;
 }


someone same issue , solution ?

thanks in advance

hi there,

check links:

- custom error pages
https://docs.joomla.org/custom_error_pages

- creating custom 404 error page
https://docs.joomla.org/creating_a_cust ... error_page

cheers.





Comments

Popular posts from this blog

Upgrade 3.4.8 to 3.5.1 failed "download package failed" - Joomla! Forum - community, help and support

Joomal 3.6.3 update error - PHP temporary folder is not set - Joomla! Forum - community, help and support

Fatal error during instalation - Joomla! Forum - community, help and support