• Resolved gillespieza

    (@gillespieza)


    I have a WPMU site that was set up ages ago, before domain mapping was built-in. I had previously used WPMU-DEV’s Domain Mapping plugin, but recently it has started causing critical errors. So, since the latest WP has domain mapping built-in, I’ve disabled and deleted the domain mapping plugin.

    I’ve added the correct custom domains to my subsites, however, every single subsite now redirects as if they don’t exist. The URL is redirected to:
    https://www.myrootdomain.com/wp-signup.php?new=mysubsite.com

    How can I fix this?

    I have the following in wp-config.php:

    define( 'MULTISITE', true);
    define( 'WP_ALLOW_MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', true );
    define( 'DOMAIN_CURRENT_SITE', 'www.myrootdomain.com');
    define( 'PATH_CURRENT_SITE', '/');
    define( 'SITE_ID_CURRENT_SITE', 1);
    define( 'BLOG_ID_CURRENT_SITE', 1);

    and in my htaccess file, I have the default suggested by WP:

    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    • This topic was modified 2 years ago by James Huff. Reason: moved to Networking WordPress since this is a multisite issue
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @gillespieza! It seems like there are a number of places that this could go awry unfortunately. One appears to be a possible discrepancy between DOMAIN_CURRENT_SITE and the record in the wp_blogs table. Do you mind checking to confirm that these values are the same? Here’s a quick description on how to do that, and a more thorough guide for checking all locations to ensure the URLs are correct. Hopefully this helps, but let us know if these values are all ready consistent and have the protocol where necessary!

    Thread Starter gillespieza

    (@gillespieza)

    Thanks – it turns out the answer was much more Homer Simpson (doh!) than that. Previously, with the domain mapping plugin, you installed the subsite as a subdomain and then mapped the custom domain in a separate section. Turns out, I hadn’t changed the URL in that first option to the custom domain. I had thought that subdomains were still required.

    Ah! I think they might be required on the initial setup, but I had seen in guides that you could go back afterwards and change it to an entirely different domain. Glad you were able to find the fix!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress Multisite keeps redirecting subsite as if it doesn’t exist’ is closed to new replies.