WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have recently added the 301 redirect non-WWW to WWW on .htaccess for my current running blog multisite (Wordpress blog resides under "mysite.com/home/" directory), they seem to work fine after all the changes in those 3 files below:


# Redirect Non-WWW to WWW
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite\.com\home
RewriteRule ^(.*)$ http://www.mysite.com/home/$1 [R=301,L]
# END Redirect Non-WWW to WWW

RewriteEngine On
RewriteBase /home/
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]


Change From

define('DOMAIN_CURRENT_SITE', 'mysite.com');

Change To

define('DOMAIN_CURRENT_SITE', 'www.mysite.com');


Change From

global $oswcPostTypes;

Change To

global $oswcPostTypes;

I could be able to view my sites as usual and log-in to each Site Dashboard BUT CANNOT BE ABLE TO USE the network tab: My Sites > Network Admin > Dashboard, Sites, Users. Is there anywhere else needed to change in order to be able to use the network tab on multisite without using any plugin or changes all the data in the database?

share|improve this question

You do not need to change the functions.php for this. You need to add both options for the domain in the domain mapping and set the one with www. as default.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.