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:
.HTACCESS
# Redirect Non-WWW to WWW
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.comhome
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]
WP-CONFIG.PHP
Change From
define('DOMAIN_CURRENT_SITE', 'mysite.com');
Change To
define('DOMAIN_CURRENT_SITE', 'www.mysite.com');
FUNCTIONS.PHP (OF THE MAIN THEME)
Change From
update_option('siteurl','http://mysite.com/home');
update_option('home','http://mysite.com/home');
global $oswcPostTypes;
Change To
update_option('siteurl','http://www.mysite.com/home');
update_option('home','http://www.mysite.com/home');
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?
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.