Support » Plugin: WordPress MU Domain Mapping » Redirect loop for mapped site.

  • Resolved mantismamita

    (@mantismamita)


    I am trying to map a domain (subsite.com) to mysite.com/subsite and am getting a “This webpage has a redirect loop” message.

    I have followed both the installation directs and Otto’s and the domain appears to be mapped. When I try to access wp-admin for subsite.com I go to subsite.com/wp-login.php (as one would expect). When I submit my username and password it redirects me to http://www.subsite.com and the form is blank again.

    I am thinking that subsite.com is redirecting to http://www.subsite.com and vice versa but I’m not sure how that happened or how to fix it.

    Many thanks in advance.

    https://wordpress.org/plugins/wordpress-mu-domain-mapping/

Viewing 9 replies - 1 through 9 (of 9 total)
  • I seem to have made some progress. I set the domain name to http://www.subsite.com rather than subsite.com (which I would have preferred) and I got the message about enabling cookies.

    I added:

    define('ADMIN_COOKIE_PATH', '/');
    define('COOKIE_DOMAIN', '');
    define('COOKIEPATH', '');
    define('SITECOOKIEPATH', '');

    and then was instructed to comment out define('COOKIE_DOMAIN', ''); which I did. I am now getting the following message:

    The domain mapping plugin only works if the site is installed in /. This is a limitation of how virtual servers work and is very difficult to work around.

    The good news is that the front end of the site is now visible. So I presume I just need to set the correct path for wp-admin but am having trouble doing so.

    Plugin Author Ron Rennick

    (@wpmuguru)

    Somewhere in your DNS/webserver config you have a redirect from the non-www version of the domain to the www version.

    If you want to keep that then remove the domain mapping and remap with the www included in the mapped domain.

    Hi Ron,
    Cheers for responding. I’ve got the front-end of the site now which was indeed a redirect problem between http://www.subsite.com and subsite.com. Now I can’t seem to access the dashboard for the subsite and get the message:

    The domain mapping plugin only works if the site is installed in /. This is a limitation of how virtual servers work and is very difficult to work around.

    I fiddled with the settings as described here: https://wordpress.org/support/topic/the-domain-mapping-plugin-only-works-if-the-site-is-installed-in
    but to no avail :/

    I’m wondering if there isn’t a setting I could check in phpMyAdmin as the site has moved around a bit and there might be a residual setting from when it was in a subfolder?

    Plugin Author Ron Rennick

    (@wpmuguru)

    In your wp-config.php, what is PATH_CURRENT_SITE defined as?

    I have:

    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    $base = '/';
    define('DOMAIN_CURRENT_SITE', 'www.mainsite.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    define('WP_ALLOW_MULTISITE', true);
    
    define('ADMIN_COOKIE_PATH', '/');
    //define('COOKIE_DOMAIN', '');
    define('COOKIEPATH', '');
    define('SITECOOKIEPATH', '');

    Plugin Author Ron Rennick

    (@wpmuguru)

    Is WP installed in the root of your website?

    Yes, it is.

    Plugin Author Ron Rennick

    (@wpmuguru)

    You only get that message if WP is not installed in the root of the website and the $base / PATH_CURRENT_SITE have a value of something other than ‘/’. You’ll have to poke around your database and see if you have a bogus path somewhere.

    Thanks Ron,
    It looks like I might have to clean up reinstall this particular site as there are obviously some problems. I just wanted to check that the problem didn’t lie with my configuration. Many thanks for your help and for a very handy plugin. I will certainly rate it once I get things working 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Redirect loop for mapped site.’ is closed to new replies.