OK after searching various posts the recommendation is to use the domain mapping plug-in.
So a couple of further questions:
Does WP over-ride the .htaccess in regards to domain names? I’ve got a redirect there which was working fine until the transition.
Why does WPMS point to a registration page when you omit the www?
That’s one option.
The other is this for your .htaccess, at the top, ABOVE your WordPress calls.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
Those rules unfortunately put the site into a redirect loop! Thanks though…
That’s … odd. I have it in mine. It SHOULD only redirect if you’re coming in from http://www.domain.com
When you setup your site, did you do it as domain.com or http://www.domain.com?
It’s set up for www.
OK removing all rules bar cache/WP this is what happens currently:
- www directs to main site – which is what I want
- no www redirects to sign up page (why:) and I want it redirect to main site.
- I also don’t want it to affect sub-domains such name1.mainsite, name2.mainsite etc.
Whilst I could get the redirect to work I couldn’t stop it affecting the sub-domains.
Solved it:
# Redirect adding leading www to root domain if no subdomain is specified
RewriteCond %{HTTP_HOST} ^domain\.com$
RewriteRule ^/?$ “http\:\/\/www\.domain\.com” [R=301,L]
This leaves the sub-domains alone but redirects no-www to www.
Now for the other headaches!
Thanks for the help Ipstenu.
Oh hah, had it backwards. Sorry! I mis-read it somehow!
I’ve finally tracked down the why of the behaviour by pure chance. This is purely FYI in addition to the above.
http://frumph.net/wordpress/wordpress-3-0-multisite-subdomain-installation-noblogredirect-behavior-fix/