WordPress.org

Support

Support » Plugins and Hacks » WordPress MU Domain Mapping » [Resolved] [Plugin: WordPress MU Domain Mapping] main site redirect non www to www issue

[Resolved] [Plugin: WordPress MU Domain Mapping] main site redirect non www to www issue

  • I finally got multisite running and 3 additional sites added.
    I have parked the 3 domains and then mapped both the www and non www versions and selected the www version as primary and all the redirects seem to work on the site just fine.

    My issue is with the main site however. When I first started I created the site as mysite.com but I want it to redirect to http://www.mysite.com.
    My .htaccess file is as this:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    
    RewriteCond %{HTTP_HOST} ^mysite.com
    RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]

    However this is not redirecting the non www to the www version. Where am I missing the setup?

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ron Rennick

    @wpmuguru

    You should have changed your main site to www before you created the network. There isn’t any way to get your current network setup to reside on the www.

    That’s a bummer. So should I just start over again, delete the WP instal and start fresh? Luckily the 3 sites are not set up yet and if they are already parked in cPanel that is a step I can skip.

    Started over from scratch…3rd times a charm as they say. All sites up and running on one WP install. Sweet.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: WordPress MU Domain Mapping] main site redirect non www to www issue’ is closed to new replies.
Skip to toolbar