We (y’know, over at illuminea) have a client’s site that is using WWW in their domain. Let’s say that domain is, hmm… www.domain.com. And their site is multisite, so that they can easily manage an English and Hebrew website.

The network admin area of the multisite wasn’t working – it created a redirect loop when I went to: http://www.domain.com/wp-admin/network

redirectloop
UGGGH! And I don’t mean the furry boots…

Some things I tried:

  1. Removing the  WWW from the DOMAIN_CURRENT_SITE in wp-config
    I read on the support forums that removing the  WWW from the DOMAIN_CURRENT_SITE in wp-config to fix the issue, BUT when I did that, something weird happened: all the internal pages (Ex. http://www.domain.com/about) on the English site redirected to the homepage (posts were fine, and all links on the Hebrew site were fine). Well, I didn’t want things to be wonky on the front-end, so I left WWW in the wp-config file.
  2. Changing and re-saving the permalink structure to /postname/
    But it didn’t help.

Here’s what it looks like:

The wp-config.php:

The  .htaccess where I have the regular multisite stuff + a redirect from non-www urls to www urls:

The Solution: wp_blogs!

With so many tables in multisite that kind of seem to be doing the same thing (a wp_options for each site within the multisite, wp_site, wp_blogs), we weren’t sure which one would be the magic place to add WWW. As it turns out, the answer was to add WWW to the url in  “domain” in the wp_blogs table!

Here’s a screenshot:

wpblogssolution

Out of curiosity, has anyone else ever run into this issue?