Joomla.it Forum

Joomla! 3 => Joomla! 3 => : squalogu 29 Apr 2021, 16:25:47

: pagina 404 in status 200 e non 404
: squalogu 29 Apr 2021, 16:25:47

ciao, la mia pagina 404 risulta con status 200 e non 404


la voce di menu che punta ad un articolo vuoto ha: noindex nofollow

inserito nel file robot:

Disallow: /index.php?option=com_content&view=article&id=75
Disallow: /errore404.html
il codice nel file error è:




:
<?php
/**
 * @package     Joomla.Site
 * @subpackage  Template.system
 *
 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */


defined('_JEXEC') or die;


if ((
$this->error->getCode()) == '404') {
   
header('Location: ' JRoute::_("index.php?option=com_content&view=article&id=75&Itemid=602"false));
   exit;
}
: Re:pagina 404 in status 200 e non 404
: squalogu 29 Apr 2021, 16:38:50

ciao, la mia pagina 404 risulta con status 200 e non 404

la voce di menu che punta ad un articolo vuoto ha: noindex nofollow

inserito nel file robot:

Disallow: /index.php?option=com_content&view=article&id=75
Disallow: /errore404.html

il codice nel file error è:




:
<?php
/**
 * @package     Joomla.Site
 * @subpackage  Template.system
 *
 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */


defined('_JEXEC') or die;


if ((
$this->error->getCode()) == '404') {
   
header('Location: ' JRoute::_("index.php?option=com_content&view=article&id=75&Itemid=602"false));
   exit;
}





una pagina inesistente tipo: miosito.it/xxnonesiste
da come risultato: https://prnt.sc/129b0vg quando invece dovrebbe dare 404


viene regolarmente reindirizzata alla pagina 404 ma con status: https://prnt.sc/129b0vg