Why the server returns 404, and the browser page is visible?

Depending on the address page displays different content. But physically page one index.html. In the browser all perfectly displayed, and if you check the server's response, it displays this:

404 error - document not found

The full response from the server at the requested address:
Array
(
[0] => HTTP/1.1 404 Not Found
[Server] => nginx/1.12.1
[Date] => Sat, 21 Feb 2018 04:05:07 GMT
[Content-Type] => text/html; charset=UTF-8
[Connection] => close
[Vary] => Accept-Encoding
[X-Powered-By] => PHP/5.6.30
)


Why is this happening?
June 3rd 19 at 19:22
2 answers
June 3rd 19 at 19:24
Well. Because the server gives the 404 header.
This can be for various reasons, most likely screws up the routing in CMS (if used).

UDP
oops, html, any cms...
Then in the settings of the Apache it is necessary to dig, he may be a home page other specified, not index.html (and for example index.php) and it sends a 404, but the default displays index.html
It is not clear at all. In the root directory everything is fine. And in subdirectories does not work if the page doesn't exist. Everything is handled one index.html. - Rahul77 commented on June 3rd 19 at 19:27
as html can "handle everything"? maybe index.php? - Viva_Goldner commented on June 3rd 19 at 19:30
just set the html is processed as php.

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html .phtml
- Rahul77 commented on June 3rd 19 at 19:33
and, of course.
Then the problem may be in the CMS and its roaming the routing.
Look for where the function return 404 and go back and so will find the problem. - Viva_Goldner commented on June 3rd 19 at 19:36
Yes , roaming problems often) - dayne.Berge commented on June 3rd 19 at 19:39
Oh...

Yeah... xD - Viva_Goldner commented on June 3rd 19 at 19:42
so is there such a function ( in the browser everything is fine processed - displays the content of the base address of the page. But the server (and Google bot) persistently give 404 page.

Here is an example of such a page

tynts

and

тынц2

all right. - Rahul77 commented on June 3rd 19 at 19:45
June 3rd 19 at 19:26
5b52ff0cf215e293420492.jpeg
Do not interfere to issue the 404, and then give the page calumite TSMs, where something is incorrectly configured, and issues a 404 header to the existing path.

Find more questions by tags Web Development