When the 404 error in the header, and redirect to a specific page? [closed]

0

I have this page with link OFF: link

But I do not have to do this with .htaccess , because I tried and it will not, I want to do with php .

I tried something like this:

if($httpCode == 404) {
    /* REDIRECT AQUI */
}

But it did not work, how do I do this?

    
asked by anonymous 06.08.2018 / 17:32

1 answer

1

Have you tried as follows in .htaccess?

ErrorDocument 404 /pagina-a-mostrar.php

If it does not work, this way you're trying to do with if would look like this: link

    
06.08.2018 / 17:57