Force users to login and redirect to a page
-
Hi,
I added the multisite feature and have multiple blogs running. I took a plugin that forces users to login when they arrive on the site. This works just fine untill they log in and are redirrected to the admin_url. I have set up different users for my sites and would like that whenever a person log in they are redirrected to the site where they are registered subscribers, and that they would be redirected directly to the main page and not the admin url. I replaced the wp-login.php code as listed below, but now all the users get redirected to the https://www.mydomain.com instead of https://www.mydomain.com/therightplace.
/wp-login.php file:
$redirect_to = admin_url();And i replaced it with this:
$redirect_to = get_option(‘siteurl’);
How can I solve this issue?
- The topic ‘Force users to login and redirect to a page’ is closed to new replies.