D
D
DoRcK2014-05-04 21:20:53
PHP
DoRcK, 2014-05-04 21:20:53

Implementation of 404 like vk.com?

Hello. Tell me the implementation of the "404" error like vk.com. There, if you go to /asdasdasdasd, for example, there will be no redirect to another address with an error page. I'm waiting for your answers.
UPD: I installed a local OpenServer and uploaded it there. The address of the error page is specified in .htaccess. And to my surprise, there is no redirect, just outputs my 404. It looks like it depends on the backend. Decided .

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
trall, 2014-05-05
@sashablashenkov

ErrorDocument 404 /error.html
Not?

D
Dmitry Korshunov, 2014-05-04
@dkorshunov55

1. Check if the link is correct
2. If the link is correct, check if there is content for this "link"
3. In case of an error in paragraph 1-2, generate the content of the 404 page and display it on the screen.
---
To be honest, it's hard to answer such a simple question :)

D
Dan, 2014-05-04
@golotyuk

header('HTTP/1.0 404 Not Found');
echo 'Page not found, sorry';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question