L
L
Lici2015-07-05 14:09:21
CMS
Lici, 2015-07-05 14:09:21

How to return a 404 response code?

On a site on some engine unfamiliar to me, a 404 error is not processed. What can I do to ensure that non-existent pages return a 404 response code?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Terekhin, 2015-07-05
@RomaZveR

header("HTTP/1.0 404 Not Found");
or more generic for Apache
.htaccess
ErrorDocument 404 /error.html

I
index0h, 2015-07-05
@index0h

Something is wrong somewhere, what should I do?
---------------
First, figure out where the page not found handler works, for this you will have to deal with a framework that is unfamiliar to you. Then add to this question specifically what you do not succeed))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question