404 header - Joomla! Forum - community, help and support


hello!

i facing strange issue.
i have real 404 pages, 404 header on non-existing pages.
i have created custom 404 page, in template have error.php following:

code: select all

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

when enter non-existing url, mysite.com/idontexist, header correctly set 404 , 404 page displayed.
however, if enter non-existing url hyphen in it, mysite.com/i-dont-exist, being redirected 303 header homepage.
i don't use 3rd party sef component, have sef urls , url rewriting active.
i have original .htaccess, no mods in it.
unfortunately i'm out of ideas about, welcome






Comments

Popular posts from this blog

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

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

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