Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

There are a ton of questions asked on Multisite domain mapping but none I can find with an answer that works for me. I am using subdirectories. Here is my configuration:

(1) Root non-www:           mysite.com              (works - non-www by default)
(2) Root          www: www.mysite.com              (works - redirects to mysite.com)
(3) Subsite     www: www.mysite.com/subsite (works - www by default)
(4) Subs non-www:          mysite.com/subsite (broken - redirects to 404 error)

I have tried adding code in .htaccess and in wp-config.php. Either way I can fix (4) but this creates an indefinite loop in the root site, breaking (1) and/or (2). This is because the root is non-www and the subsites are www. Is there a conditional statement for .htaccess that can fix this? Or is it better to address domain mapping via wp-config.php?

I also looked at the MU Domain Mapping plugin, but it asks subsite-users to set-up a DNS ANAME or CNAME. This is too complicated for my users - the redirect needs to be automatic.

Any suggestions would be much appreciated.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.