Login Redirect

Hi there.

The situation I have here is I am creating a subdomain for every blogger who sign up for the service, such as

Main Site: webdomainname.com
User1 will get user1.webdomainname.com
User8 will get user8.webdomainname.com

From the main site where the user will be able to login, I will want user1 or userxx to get redirected directly to their web page, user1.webdomainname.com.

Please kindly advice if this is what this plugin is meant for, and if not, please advice how do I achieve this.

Thank you.

Best Regard

  • aecnu
    • WP Unicorn

    Greetings Bill,

    Welcome to WPMU Dev!

    Yes this is the correct plugin to be using for redirecting after login.

    Alternatively, you could code up a solution to automatically redirect upon login, perhaps add to your theme's functions.php file, using the following:

    Thank you for being a WPMU Dev member!

    Cheers, Joe :slight_smile:

    If this thread is not resolved because the suggested action did not work or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

  • blogcapitol
    • New Recruit

    Hi there.

    Great to hear from you. Unfortunately it is not really working. I see this configuration page on the network administrator page. Because what I need is something dynamic, I cannot put in a static referred page there. Please kindly advice.

    Thank you.

    Best Regards

  • Baeta
    • WPMU DEV Initiate

    Hi Bill!

    Here was the solution I made.

    In the plugins/login-redirect folder there is a file login-redirect.php

    Edit the file on line 62 -> function redirect
    Insert this line above:
    global $user_login;

    Where you have: (Appear 2 times)
    $login_redirect_url = get_site_option( 'login_redirect_url' );

    Change for this: (Appear 2 times)
    $login_redirect_url = 'http://'.$user_login.'.webdomainname.com/' ;

    Save and upload.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.