K
K
Konstantin2015-11-02 23:40:31
PHP
Konstantin, 2015-11-02 23:40:31

How to set up redirection of a user by a link after authorization?

Good afternoon!
Imagine, on the www.secret.site.ru subdomain there is an Internet resource (website), access to which is carried out through the authorization page (a password is required).
But the following inconvenience arose: if the user is not authorized and follows the link www.secret.site.ru/category-1/post-1/, then, of course, he is redirected to the page www.secret.site.ru/login.php, on which the authorization form (password entry) is located. Now, after successful authorization, the user is redirected to the Main page of the site (www.secret.site.ru). It would be desirable that after successful authorization on the login.php page, the user would be redirected to the page to which he was going to go, i.e. in this case, www.secret.site.ru/category-1/post-1/.
Is it possible to implement this and how? The site has a normal php authorization using a session.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question