S
S
Stanislav Pochepko2014-12-12 03:24:22
PHP
Stanislav Pochepko, 2014-12-12 03:24:22

Response codes from the server. How to use correctly?

Good day, community. I, as a not very experienced PHP programmer, want to learn how to properly use response codes from the server to the client. I came across a couple of articles on the Internet that this helps search robots. So. I have a project and I would like to do everything right. There are content restrictions for users. That is, one content, the other another. And how to correctly give answers to codes on pages if, for example, the content is not available to such a user, and so on.
I would be happy to provide links to explanatory material.
Someone unsubscribed, but then deleted the answer.

user not authorized - 401, authorized user denied - 403.

It is clear. Is there nothing else? Are there any other nuances for other codes?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Filippov, 2014-12-12
@colix

I think most of the information is there for you.
When a user accesses content that they can view, we return a 200 code.
If the user does not have permission to view the content, we return a 403 code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question