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.
Related Posts:
- WordPress Multisite – Multiple subfolders for blogs
- WordPress multisite subdirectory redirect infinite loop issue
- multisite htaccess 301 redirects
- W3 Total Cache Plugin with WP 3 MultiUser [closed]
- Domain redirect in WordPress multisite
- Why wordpress multisite redirect to wp-signup if site exists?
- Sub-subdomain getting redirected to main domain
- How to exclude a directory from WordPress permalinks in a Multisite environment?
- How to disable the default WordPress redirect to non-www URLs?
- Redirect subdomain in Multisite installation?
- Issue with htaccess redirection in WP Multisite
- Redirect only posts to New Domain
- Multisite setup help – plain domain/subsite always redirects to domain with subdir multisite
- Temp URL Redirect Loop
- Wrong Redirect/Rewrite Rules?
- Htaccess file isn’t redirecting http sub-pages to https––they display 404 error instead, tried many solutions and none work
- URL without www redirect directly with submission page – Multiwordpress install
- Multisite Redirection to new domains
- Redirect old uploads after moving to multisite
- WordPress: how to change URL for individual MultiSites?
- Multisite Subdomain Redirect Mask
- Working with Reverse Proxies and Multisite Installation
- multisite 404 subfolder same name slug as site
- How to make the redirects right? IP to domain name folders
- Redirect extra url to Multisite in folder
- External rewrite rules missing in htaccess – Multisite
- Site Redirecting to wp-signup.php
- Redirect Main Site to Subsite in Multisite WordPress
- Why is WordPress Multisite redirecting to wp-signup.php and how to fix it?
- multisite 404 error for subdirectory
- Multisite htaccess on localhost with WP as an SVN external?
- WP-Admin not working properly at WordPress multisite with subdirectories
- How to disable Multisite sign-up page?
- Multisite wordpress and subdomain URL collisions
- Error 101 after upgrading WordPress
- Basically the opposite MultiSite URL question that most people ask
- Multisite wp-admin redirect loop
- WordPress network (multisite) /wp-admin/ redirect loop (ERR_TOO_MANY_REDIRECTS)
- Suppress subdirectory from WordPress Multisite primary URL
- Multisite – Redirect All Users to Subsite Home Page on Subsite Login
- 301 Redirects for posts, category, pages from original domain to sub-domain of multisite
- Trying to access second site dashboard on a multisite configuration proceeds to an error
- 500 error when using virtual host
- Members area with externally-managed htaccess / htpasswd authentication?
- Multisite network admin – URL / redirect error
- WordPress multisite subdirectory on nginx behind reverse proxy
- Dissolve Multisite while making site #5 the main site?
- Disable domain redirect
- Redirect users on logout
- Create rewriterules for different domains in htaccess file with WP multisite
- WordPress multisite in subdirectory, not root, and remove base folder from url
- Multsite redirecting to the main site
- Add additional non-rewrite .htaccess directives on multisites via mod_rewrite_rules filter
- Error uploading files bigger than 58 MB
- WordPress Multi-Site on Ubuntu 18.04 LAMP Keeps Re-Directing
- Some PDF files get Forbidden Access and other open normally on the same directory subsites
- Multisite Subdirectory with same domain subdomain
- WordPress Multisite + Erros with URLS and ADMIN
- 301’s not working with multisite
- WordPress sub-domain multisite 505 error
- Multisite, Subdomain, shared NFS directory Linux HELP
- How to protect specific uploaded files from being accessed by non-logged-in users in WP-multisite
- URL for images folder on Multisite
- Multisite install w/ Sub domains on a subdomain
- Help with multisite redirect issues using Cherokee OR solid nginx config?
- Missing images after moving servers
- 301 Redirection After Comment
- Multisite Redirect for Home Page Only
- 404 not working on main site on multisite
- How to redirect user after session timeout
- Redirect a WordPress Multisite url after it has been change to a new one
- Redirecting specific sites to HTTP in WordPress Multisite
- Redirect Function Prevents Images from Showing in Front-end Media Uploader
- Rewriting request to another site
- Getting file errors in a WordPress Multisite ADMIN
- Multisite network admin login redirect
- WP Multi Site – configure Sub domain pointing to parent sub directory
- Can I add a rewrite rule in htaccess to remove the multisite subdirectory from the URL?
- trying to install a wordpress multisite in a subfolder and have custom subsite urls
- Events Calendar Multisite 404 for events
- WordPress multisite redirect one custom non www domain to www
- Multisite issue
- Can’t access 2nd site (sub) dashboard of WordPress Multisite
- How do I point two urls to the same child site in a multisite config
- Redirecting two Multisite domains to Single site on different host
- All Subsites of a WordPress Multisite install 302 redirects to the main site
- Multisite install in a subfolder won’t work with www
- Multisite /files/ URLs broken after server move
- Multisite login and redirect to users main blog,
- WP Multisite .htaccess interferes with cgi-bin
- Redirect all users, except network administrators, from the main site to a subsite
- How to redirect author subdomain pages to each author pages on www
- Multisite move server giving redirect loop
- No input file specified after enabling multi site
- Pages redirect me to the homepage
- How can I set up a completely separate (not multisite) WordPress installation as a subdirectory of an existing WordPress blog?
- Redirect WordPress MS to no-www version, excepting some dirs and prefixes
- Redirect authors from upload.php url to Home page in Multisite
- How to redirect root blog to a specific one in multilang WP?
- Multisite website configure Domain issue