Multi-Site Subdomain: Show master site under subdomain if no sub site exists

Question

I’ve got the following situation:

We got a WP Multisite and if a subdomain is not associated to a network site, we want wordpress to show the master site (e.g. blog ID 1) under this subdomain without a redirect.

 www.domain.com --> master site of the multisite network
 existing.domain.com --> shows the existing blog registered under this subdomain
 nonexisting.domain.com --> it should show the same as www.domain.com without any redirects.

I have already changed wordpress to use root-relative URLs everywhere, so it should not matter if we are on "www" or "nonexisting" subdomain.

Thanks for your suggestions! 🙂

0
user2040627 2 months 0 Answers 9 views 0

Leave an answer