• Resolved superbear

    (@superbear)


    I’m really confused!
    I’ve configured WP for multisite with subdomains.
    I’ve modified WP-config.php and .htaccess as per Network Setup instructions.

    Everything appeared normal until I ran a Google search and tried creating a sitemap. I am experiencing 2 specific issues.

    1) If I Google my site and click on the link it takes me to: https://www.mydomain.com/wp-signup.php?new=mydomain.com

    2) When I try to create a sitemap.xml for the 19 pages of my website using Godaddy cPanel or a WP Plugin, it gives me:

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <urlset xmlns=”https://www.sitemaps.org/schemas/sitemap/0.9″&gt;
    <url>
    <loc>https://mydomain.com/</loc&gt;
    </url>
    <url>
    <loc>https://mydomain.com/wp-signup.php?new=mydomain.com</loc&gt;
    </url>
    </urlset>

    I looked an an older post here and tried changing WP-config.php from:

    define( ‘SUBDOMAIN_INSTALL’, true );

    to
    define( ‘SUBDOMAIN_INSTALL’, false );

    That fixed problem (1), but my www and subdomains no longer appeared in my Dashboard list of sites and were replaced by “\”, and I was still unable to build a sitemap.

    Can anyone advise what I am doing wrong?

    Many Thanks in advance ??

Viewing 15 replies - 1 through 15 (of 15 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Change subdomain install back to true, first of all. That settings is:

    True: I am using subdomains (i.e. sub.domain.com)
    False: I am using sub folders (i.e. domain.com/folder)

    Now, double check what’s being redirected.

    I’m betting either https://www.domain.com OR domain.com is redirecting, but not both. Once you know which it is, you can set up a .htaccess rule to force it the other way.

    Thread Starter superbear

    (@superbear)

    Hi Ipstenu,

    OK. I’ve reverted to subdomain, but not sure how to “check” the redirect; but I can say that Google organic search lists the site as domain.com (without the www) and same with Chrome when I mouse over the link.

    Not to distract, but do you have any thoughts about the sitemap issue?

    Cheers ??

    Thread Starter superbear

    (@superbear)

    OK… I was able to check the redirect.
    It’s domain.com that redirects ??

    Thread Starter superbear

    (@superbear)

    Hi again Ipstenu,

    I added a rule to .htaccess that redirects non-www to www:

    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

    This resolves issue (1) and (2), HOWEVER, when I try to connect to a subdomain of my multisite newtwork (subdomain.domain.com) the browser gives up and displays the “too many redirects” message.

    Can you tell me if there is another rule I can use that resolves this conundrum?

    Thanks again ??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    When you try to connect, or when you try to log in?

    Thread Starter superbear

    (@superbear)

    The redirect rule I added to .htaccess won’t allow me to connect to the subdomain directly in browser, or via WP Dashboard (Sites).

    As regards login, when a user creates a new subdomain site, a link is generated (newsubdomain.domain.com/wp-login.php. As soon as I click on the “Log-in” link, the redirect takes me to: https://www.newsubdomain.domain.wp-login.php Login fails due to the www being added as a prefix. ??

    It appears to me that if a non-www to www redirect is added to .htaccess, it’s going to do its job and convert all subdomains to www.

    I hope you can think of an alternative. Fingers crossed ??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

    That says “Any time someone comes to a NON www domain, redirect!”

    You need to have something more specific, and it really depends on what your DEFAULT is.

    When you go to your primary domain, is it https://www.domain.com or domain.com?

    Thread Starter superbear

    (@superbear)

    Hi Ipstenu,
    Thank you for sticking with me on this ??

    OK. I understand, but haven’t any experience coding for .htaccess. If there is a resource you can suggest for that, I will be happy to take a look.

    But, just in case you can help with a snippet or two of code, here’s how my site is setup:

    1) The primary domain is https://www.domain.com
    2) Users do not register directly via https://www.domain.com
    3) I am using a plugin (WP-Client) which acts as a HUB for direct communications with customers.
    4) To access the HUB, a new customer registers using the WPC registration form (https://www.domain.com/client-registration/).
    5) WPC registers customers in its own database, but they automatically become registered Users of the https://www.domain.com site.
    5) WP Multisite Registration Settings are set to “Logged in users may register new sites.”
    6) Customers are automatically logged-in after registration, or using https://www.domain.com/wp-admin/
    7) Logged-in customers do not have access to https://www.domain.com user dashboard, only WPC HUB interface (page).
    8) WPC customers can create their own subdomain site on our www domain (customer.domain.com). They use this site to promote their own products and services.

    It’s at this point that the current system fails because the redirect converts “customer.domain.com/wp-login” to “www.customer.domain.com/wp-login”

    So, I think I need a .htaccess rule that says:

    If subdomain of domain.com, don’t add WWW
    If domain.com add WWW

    Do you agree?

    Many Thanks ??

    Thread Starter superbear

    (@superbear)

    CORRECTION!
    My primary domain is: domain.com (currently adding WWW with .htaccess rule)

    But the .htaccess rules I suggested are correct:

    If subdomain of domain.com, don’t add WWW
    If domain.com add WWW

    Kind Regards ??

    Thread Starter superbear

    (@superbear)

    BTW, I find it confusing that in the WordPress Dashboard > Sites, under Domain, my site is listed as https://www.domain.com regardless of what is in the .htaccess file

    ??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Well… Here’s the thing. You used www even though the install for Multisite outright tells you not to. So this is what happens sometimes, and this is why you will see I spend a lot of time telling people not to use WWW. It works most of the time, but when it doesn’t, boy does it die ugly.

    # Redirect non-www urls to www
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^example\.com [NC]
    RewriteRule (.*) https://www.example.com/$1 [R=301,L]

    That will ONLY check for example.com and, if found, force www. It won’t touch your subdomains.

    Thread Starter superbear

    (@superbear)

    Well, I feel like a little child. LOL! (and I’m 57 this year too!!!) ??
    I don’t remember deliberately choosing www, but then again, I did spend 8 hours getting out of the first mess I created and was punch drunk by the time I got around to the re-install.

    Anyway, all’s well that ends well, and I can’t thank you enough for your help with my fledgling site. I just hope it manages to make me a few bucks after all this.

    Your code has worked a charm. I only hope that Google won’t penalize me for some reason or other. I’ve also spent an age working on the SEO.

    Thank you again, and hopefully you won’t be hearing from me again anytime soon.

    Keep up the great work!
    Bon courage and Warm regards,
    Damon

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Nah, Google won’t hurt ?? The 301 is a safe redirect.

    And don’t sweat it. In the long run, this is how we’ve always learned best. Making mistakes ??

    Good day I also have almost the same problem. When I visit site via browser everything works fine, buy when I visit it via any other device it redirect me to https://www.mydomain.com/wp-sighup.php?new=mydomain.com. Any ideas?

    Hi,

    In my case, the code posted by Ipstenu did not work until I pasted it just bellow the line #END WordPress

    Then, the redirection to www. started working. By the way, thank you Ipstenu!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Getting ../wp-signup.php?new=mydomain.com loop’ is closed to new replies.