The official WordPress Codex states: “In WordPress 4.5+, domain mapping is a native feature.”
Unfortunately, this plugin is no longer maintained, even though it is still the best, safest and easiest way to ensure perfect redirection to to correct (sub) blog.
define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST']);often results in wrong redirections to the main blog:
In WordPress Network Admin:
http://www.mydomain.org/will likely make typing
mydomain.orgredirect to the main blog:
At the time of writing this review I am still very happily using WordPress MU Domain Mapping on WordPress MultiSite 5.7.1-alpha-50553, PHP 8.0.2. to ensure that my visitors end up on the correct blog (http, https, with and without www).
define('MULTISITE', true); define('SUBDOMAIN_INSTALL', true); define('PATH_CURRENT_SITE', '/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1); /* Prevent redirection to /?signup=new */ define('NOBLOGREDIRECT', 'https://www.main-domain.com'); define('SUNRISE', 'on');
The defined COOKIE_DOMAIN will be set by this plugin to the correct url of all your blogs.
- The topic ‘Still the best solution!’ is closed to new replies.