Q
Q
Quber2015-05-17 19:14:09
PHP
Quber, 2015-05-17 19:14:09

If a page is available to one user group that is not available to another, then what kind of redirect should be done for the second group?

There is a user group that has access to one of the pages of the site, for example, Registration.
There is a second group of users to which the same page can either be accessed or redirected. For example, if the person is already logged in, then redirect him from the registration page to the main one.
Problem: if you use a 301 redirect, it turns out that "the page has been moved completely." But the redirect is temporary in fact. Then it is necessary to use 302?
Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Z
Zakharov Alexander, 2015-05-17
@Quber

In my opinion, the difference between 301 and 302 is important for search engines, but if I have to redirect the user, I usually do it through 302. There is one subtlety when redirecting - if it happens when using Ajax, then the 302 client will not notice until it hits the last one page in the redirect chain.

D
Dmitry, 2015-05-17
@By_Engine

Than a simple header('location: /'); not satisfied?

P
Pavel Volintsev, 2015-08-30
@copist

302 so that the browser does not remember this redirect.
301 to remember. including remembers and googlebot.
In this case, you need 302.
And if an authorized user or an anonymous user climbs somewhere where he is not supposed to climb according to his rights, then 403 without redirects.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question