WordPress MU Domain Mapping
[resolved] main site redirect non www to www issue (4 posts)

  1. designerken
    Posted 2 years ago #

    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?


  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    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.

  3. designerken
    Posted 2 years ago #

    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.

  4. designerken
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress MU Domain Mapping
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic