O
O
Outsider V.2016-01-23 23:20:02
PHP
Outsider V., 2016-01-23 23:20:02

What redirect to use?

The kickOutIfLoginned() controller method kicks the user to the main page of the site if he is already logged in and tries to go to the registration page. That is, you just need to send the Location redirect header.
Question - what response code to use? I found a bunch of incomprehensible and conflicting information about old and new requirements and compatibility ... In this case, either 303 Temporary Moved (or maybe 307 ??), or 302 Found should be ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2016-01-23
@dimonchik2013

look at how the leaders have done (Fiddler, for example)
it’s easier on the page to draw some kind of status like Already logged in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question