codeGEN
codeGEN

Reputation: 714

Status code to be used when accessing a profile

I have developed a PHP application with a myaccount area. Where myaccount will be the users personalized profile. And to access the myaccount area the users need to be logged-in. However if a user who is not logged in try to access the myaccount area I am redirecting them to the log-in page. At the moment I haven't add a custom header status code & chrome dev tools tell me that the status code 302 is being used. Is this ok for this type of purpose or do I need to use a different header like 301.

Upvotes: 0

Views: 18

Answers (1)

Mainz007
Mainz007

Reputation: 543

302 means temporarly unavailable while 301 means permanent unavailable. So you see 302 is totally correct in that case.

Upvotes: 1

Related Questions