Shape 5

Joomla Templates => Helion - Club => : chlyroju March 06, 2014, 12:30:05 AM



: Redirect 404 via error.php
: chlyroju March 06, 2014, 12:30:05 AM
Bonjour,
J'ai appliqu? la m?thode d?crite dans le post http://www.shape5.com/component/option,com_smf/Itemid,75/topic,32099.msg129269/#msg129269 (http://www.shape5.com/component/option,com_smf/Itemid,75/topic,32099.msg129269/#msg129269)
Mais cela ne fonctionne pas !
Une mauvaise url redirige vers la page d'accueil et non vers la page 404
Pouvez-vous m'aider
Merci
Christian

Hello,
I applied the method described in the post [url]http://www.shape5.com/component/option,com_smf/Itemid,75/topic,32099.msg129269/#msg129269[/ url]
But it does not work!
Bad url redirects to the home page and not to the page 404
Could you please help me
Thank you
Christian


: Re: Redirect 404 via error.php
: mikenicoll March 06, 2014, 11:31:47 PM
Hello,

That wouldn't be part of our Template and would be customizations. Joomla has some more documentation about how to do this here if my tips didn't help.

http://docs.joomla.org/Creating_a_Custom_404_Error_Page

-Mike


: Re: Redirect 404 via error.php
: chlyroju March 07, 2014, 08:55:39 AM
Merci Mike
En fait il faut utiliser ce code avec Joomla 3.0 :
if (($this->error->getCode()) == '404') {
header('Location: /index.php?option=com_content&view=article&id=239');
exit;
}

Thank you Mike
In fact you must use this code with Joomla 3.0:
if (($this->error->getCode()) == '404') {
header('Location: /index.php?option=com_content&view=article&id=239');
exit;


: Re: Redirect 404 via error.php
: mikenicoll March 07, 2014, 07:21:10 PM
Hello,

Thanks for posting your changes.

-Mike