Support » Networking WordPress » Sub site redirecting to root on initial visit but then is fine

  • So I had this problem with a new multisite setup and I just did a fresh install of the latest version of WP multisite and then imported pages which were exported from a WP SINGLE site and I still have the issue.

    Usually when I first go to a sub site such as this:
    it will redirect to the root site:

    However if I enter the url again or any of the other sub sites it works fine. Clear the cache and try to duplicate but no redirects. Go to a new browser and initially it will do the same redirect but then it works fine and I cannot reproduce the redirect issue. It doesn’t happen every single time after the page has been visited. If I go to another computer, windows 10 & edge it will always redirect the first time I enter the url of a sub site but then it works fine if I enter the url a second time.

    Shared a screen with someone in another state and had them load the page and it redirected initially as well but then worked fine.

    So where would this have to be or are there just too many possibilities?
    .htaccess or wp-config?

    I also have a login redirect function but don’t think that would do it?

    function login_site_redirect ( $redirect_to ) {
    global $user;
    $primary_blog_id = get_usermeta($user->ID, ‘primary_blog’);
    $blog_details = get_blog_details($primary_blog_id);
    $redirect_url = $blog_details->siteurl;
    return $redirect_url . “/resources”;

    Anyone ever have that happen in multisite?
    Thanks for any tips!!

Viewing 1 replies (of 1 total)
  • Couldn’t find much info on this but got it sorted. I just had to be sure to choose my url without www as the installation url during setup. Originally I just let it install with the default settings as I usually do but that used www and had some issues.

Viewing 1 replies (of 1 total)
  • The topic ‘Sub site redirecting to root on initial visit but then is fine’ is closed to new replies.