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.

I have Multisite enabled and can only view my site with the "www". When I try without the "www" it sends me to the sign-up page and says 'Registration has been disabled.'

www.domain.com/portfolio  <-- load correctly
domain.com/portfolio      <-- redirects to sign-up page

I've tried NOBLOGREDIRECT, but nothing changes.

define('NOBLOGREDIRECT', 'http://www.domain.com');

In .htaccess, I've also tried the following with no success.

RewriteCond %{HTTP_HOST} !^.domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]

How do I get my site viewable with and without the "www." in the domain?

share|improve this question
    
what's on your Settings -> General Settins for: -> WordPress address (URL) -> Site address (URL) check that you don't have www in those two urls –  Azizur Apr 11 '11 at 11:34
    
@Azizur that option doesn't appear in 3.1.2 multisite. –  Andrew Apr 27 '11 at 6:59
add comment

2 Answers

@jaysonp, you were really close but in your Rewrite rule you forgot the www.

Add this in your htaccess file right under RewriteEngine On

RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
share|improve this answer
add comment

The answer is here: Domain redirect in Wordpress multisite.

You need to use the domain mapping plugin.

http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

A must read http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/

share|improve this answer
1  
+1, I'm using the domain mapping plugin with subdomain install and the OP's RewriteRule in my apache virtualhost conf. –  Andrew May 2 '11 at 2:30
add comment

Your Answer

 
discard

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