Jump to content

Edit History

sferrerowebimpacto

sferrerowebimpacto

Hello, I've modified the Dispatcher.php class so, when the url is modified and it doens't match the real product url it will redirect you to the 404 page, this is they code I've used to redirect it:

Tools::redirect('index.php?controller=404');

I get redirected to my 404 page, but the problem is that, along with the 404 (red arrow), a 302 from the redirect is send (yellow arrow).

image.thumb.png.03c54fde19a6222d8312c0e11cdec2ec.png

I've also tried using:

Controller::getController('PageNotFoundController')->run();

 

But I receive this screen instead of my 404 website:

 

image.thumb.png.a5e0d9445381f3e86c18186e578259ed.png

Is there a way of forcing the 404 without the 302?

 

Thanks.

sferrerowebimpacto

sferrerowebimpacto

Hello, I've modified the Dispatcher.php class so, when the url is modified and it doens't match the real product url it will redirect you to the 404 page, this is they code I've used to redirect it:

Tools::redirect('index.php?controller=404');

The problem is that, along with the 404 (red arrow), a 302 from the redirect is send (yellow arrow).

image.thumb.png.03c54fde19a6222d8312c0e11cdec2ec.png

Is there a way of forcing the 404 without the 302?

 

Thanks.

×
×
  • Create New...