Redirect loop with domain mapping subdirectories

We have moved our server to a vps at hostgator. I have a multisite network the main site is **URL REMOVED ON REQUEST**, the sub sites are

**URL REMOVED ON REQUEST** style
supposed to map to **URL REMOVED ON REQUEST**

**URL REMOVED ON REQUEST** spotlight
supposed to map to **URL REMOVED ON REQUEST**

**URL REMOVED ON REQUEST** /travel

supposed to map to **URL REMOVED ON REQUEST**

**URL REMOVED ON REQUEST** /faces

supposed to map to **URL REMOVED ON REQUEST**

When I turn on domain mapping I get a redirect loop.

The domains are added as parked domains at hostgator. The server setup is a vps.

Currently I would like to only work with faces and travel and I will add them and turn on domain mapping for them. I can't have style and spotlight go down.

Can you help me diagnose the redirect loop?

  • Ash
    • WordPress Hacker

    Hello @elizabeth

    Welcome to WPMU community and Happy New Year!!

    I hope you are well today and thanks for asking the question.

    When you map domain from subsite, is the status valid? Also is the parked domain is pointed to wordpress installation?

    Please let me know.

    Cheers
    Ash

  • Ash
    • WordPress Hacker

    Do some more testing please.

    1. Would you please try removing these lines from your wp-config.php?

    define( 'DOMAIN_CURRENT_SITE', 'YOUR_MAIN_DOMAIN' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    YOUR_MAIN_DOMAIN should be your main domain url.

    2. Remove a mapped domain from subsite and check the URL. Is your main site loaded for the parked domain?

    3. Use add-on domain instead of parked domain. Does it work?

    Also note that, some servers need up to 72 hours to propagate the DNS settings.

    Please let me know. If it still doesn't work, I will take a look in your server.

    Cheers
    Ash

  • elizabeth
    • New Recruit

    1. Would you please try removing these lines from your wp-config.php?
    define( 'DOMAIN_CURRENT_SITE', 'YOUR_MAIN_DOMAIN' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
    YOUR_MAIN_DOMAIN should be your main domain url.

    I tried that already it made no difference. I readded them because it made no difference.

    2. Remove a mapped domain from subsite and check the URL. Is your main site loaded for the parked domain?

    The parked domain works. And loads the main site.

    3. Use add-on domain instead of parked domain. Does it work?

    The add on domains did not work.

    Everything goes back to the redirect loop at this point.

  • Ash
    • WordPress Hacker

    Would you please send me your admin and cpanel login details so that I can check some settings?

    To send details, please use our contact form: https://premium.wpmudev.org/contact/

    Select: I have a different question
    Subject: Attn-Ash
    Details: Send all required details (admin info and cpanel details) with a link of this thread, so that I can track.
    Also post a note here once you send the info.

    I will be happy to take a look :slight_smile:

    Also, this is 0700 am here and I am off shortly, so that I will take a look at the evening.

    Cheers
    Ash

  • DavidM
    • DEV MAN’s Mascot

    Hi @elizabeth,

    I'll be happy to see how I can assist here alongside Ash. You can download previous versions of Domain Mapping by clicking on the "changelog" link under the right-hand sidebar here (it's near the version details - "version 4.1.1 - changelog - translations").

    https://premium.wpmudev.org/project/domain-mapping/

    However, that I can see, you've got a Single membership for our Membership plugin so you wouldn't be able to access the downloads unless you've got another account with us.

    I was wondering, given that, could you let us know the version of Domain Mapping you're using?

    Thanks,
    David

  • Ben
    • The Reaper

    Hi I am having some similar problems and I am thinking it might be related to server side set up stuff.

    I am running and ngnix webserver with varnish. I noticed I get a redirect loop at any time there is an attempt to do a redirect to https on a mapped domain name (redirecting via ngnix on the main domain is fine) via ngnix redirect, varnish redirect, a php plugin, or manually writing

    header('HTTP/1.1 301 Moved Permanently');
    header('Location: https://' . $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);

    This is hurting my ability to use the marketplace plugin with stripe.

    https works fine with wp-admin on a mapped domain name.

    After reading this article:

    http://wordpress.stackexchange.com/questions/45685/ssl-redirect-loop-using-wordpress-https-plugin

    I think some of the issues that they are describing there might be the key to the redirect loop.

    I am wondering if some people strong with ngnix set up may know if this is indeed what is the root of the problem and what would be the code to insert into the ngnix set up file to make things function properly.

    Been struggling this for a while, please advise, thank you!

  • Ben
    • The Reaper

    @Ashok

    I believe the issue is with domain mapping. However, marketpress is being effected directly because in order for stripe payment processing to work it requires https for stripe payment processing. It works with the main domain name, because it is not mapped.

    Yesterday I created this thread: https://premium.wpmudev.org/forums/topic/still-having-trouble-with-domain-mapping-https

    However its been some time since any response, please review, thanks!

    Been working on this issue with your domain mapping plugin for a while and can't proceed till its resolved...driving me crazy. Hopefully u guys can help. Thanks.

  • Sonya
    • Design Lord, Child of Thor

    Any fix for this? I am having the same problem. Having define('FORCE_SSL_ADMIN', true); in wp-config.php file creates redirect loop. Without it, the Force Admin and Login to HTTPS option in Domain Mapping plugin, does not force Mapped Domains into HTTPS.

  • Ash
    • WordPress Hacker

    Hey @Matthew

    Thanks for posting in this thread, however it might be best if you open your own, even if the issues seem closely related. That way it will remain independent of this one and ensure it doesn't confuse issues here if this thread needs reopening again by the author.

    It also means the member who started this thread or anyone following it isn't inundated with post notifications each time we respond to each other. A lengthy thread could annoy the original poster.

    This also allows us to better track and answer your questions to ensure we don't miss any for you.

    You can start a new thread here:

    https://premium.wpmudev.org/forums/#question

    Thanks
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.