there, WOuld you have an idea to why when i activate domain

HI there,

WOuld you have an idea to why when i activate domain mapping and receiving too many redirect loop message on the subdomain sites

The main site and subsites using https but when i visit the login page to login in a subsite, i get . (ERR_TOO_MANY_REDIRECTS).

ANy idea on how to fix this will be greatly appreciated.

Here’s my settings.

1. in the mu-plugins folder i have this that forces https in front and backend .

function toz_force_https () {
if ( !is_ssl() ) {
wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 301 );
exit();
}
}
add_action ( 'template_redirect', 'toz_force_https', 1 );

2. i have this in my wp-config.php

define('WP_DEBUG', false);
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_AUTO_UPDATE_CORE', false );

/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'www.mainsite.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define('NOBLOGREDIRECT', 'https://www.mainsite.com/' );
define('SUNRISE', 'on');//domain mapping
define('FORCE_SSL_ADMIN', true);

3. my htaccess

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
# uploaded ?les
RewriteRule ^([_0-9a-zA-Z-]+/)??les/(.+) wp-includes/ms-?les.php??le=$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).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
RewriteRule . index.php [L]

When i comment out //define(‘FORCE_SSL_ADMIN’, true); , the frontend ssl works fine and able to access the login page, but what i need the most isn’t working because i want the login and dashboard to be accessible through ssl (https)