• Resolved bg01

    (@bg01)


    Hello!

    I have a primary site (www.primary.com) with multiple users each with their own private subdomain (www.user.primary.com). All of the subdomains are replicates of my primary site which serves as a template.

    As it is, users log into their respective site through the login page of the primary site, which then auto redirects the user to their subdomain. However, once logged in, users can leave their subdomain and see the primary site by simply typing the primary domain into their browser (since they are technically registered users of both sites). This is a no-no!

    I’d like to have users be able to type into their browser the primary domain to log in, rather than their subdomain to login. Each user is registered under their respective site and the primary domain only, so users cannot see other users.

    Any suggestions? Many thanks in advance!

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

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Well… You’re using Multisite. That’s kind of how it works.

    Why are they members of the main site if you don’t want them to be members?

    They can log in at user.primary.com/wp-login.php anyway.

    Thread Starter bg01

    (@bg01)

    Hi Mika, thanks for your reply.

    For some reason, when I type a the sub-domain(www.user.primary.com)into the browser, it redirects to the login of the primary site (www.primary.com). This only occurs when I have a privacy plugin activated (I’ve tried Network Privacy and Private Login). Hence, when the plugin is network deactivated I can access the subdomains through the browser correctly.

    Ive tried turning off network activation for the privacy plugin and énabling it for each site but still the same problem.

    Also: When the privacy plugin is on, and I type in the subdomain + wp/login (www.user.primary.com/wp-login)I get a blank page with this appended to the subdomain:

    /not_found?redirect_to=%252Fnot_found%253Fredirect_to%253D%2525252Fnot_found%2525253Fredirect_to%2525253D%25252525252Fnot_found%25252525253Fredirect_to%25252525253D%252525252525252Fnot_found%252525252525253Fredirect_to%252525252525253D%2525252525252525252Fwp-login

    Any ideas? Thanks so much for your help!

    I just checked my own site with my own plugin and it looks like I can accomplish in the end what OP describes.

    Try More Privacy Options and set each site’s Reading->Visibilty to Members Only(…visible to registered users I add to my blog).

    Thread Starter bg01

    (@bg01)

    Hi David, thanks for your reply.

    Unfortunately the problem still persists even with your plugin. When I type a subdomain into the browser it redirects to the primary site.

    BUT I found out how to access the login page of each subdomain without being redirected to the primary. It requires appending something like:

    wp-login.php?cxcgmmcihqqpzzlth0ncon

    to the end of the subdomain.

    So now the question now becomes: how can I access the subdomain login by simply typing in http://www.user.primary.com without that jargon at the end?

    Thanks for the help!

    Ignore adding any plugins until you are certain you are logging in to your subsites without error. The errors you post and the added jargon are not added by my plugin.

    It seems simple but your second post above should generate a 404 when you type

    www.user.primary.com/wp-login

    You should be fine with

    http://user.primary.com/wp-login.php

    If that is not it, you must have something else amiss. Any other plugins or settings details you can provide? I can’t reproduce your problem with what you have said so far.

    Thread Starter bg01

    (@bg01)

    When I type in:

    user.primary.com/wp-login.php

    I get a completely blank page with this address:

    “not_found?redirect_to=%252Fnot_found%253Fredirect_to%253D%2525252Fnot_found%2525253Fredirect”

    Also, I can login as any user to the subsites perfectly fine when I type in that jargon at the end of the subdomain. It’s just a matter of getting to the login page of the subsite since appending “cxcgmmcihqqpzzlth0ncon” is less than intuitive.

    Another interesting observation: when I type my primary domain (www.primary.com) into the browser it also redirects to that jargon at the end (but with the correct login page, so it’s not really a problem).

    http://www.primary.com/wp-login.php?cxcgmmcihqqpzzlth0ncon

    Is this a problem with .htaccess file? Something tells me it’s not a plugin problem, since a variety of network activated privacy plugins produce the same result. Thanks so much for your help David, really appreciate it.

    Your jargon “cxcgmmcihqqpzzlth0ncon” is certainly not coming from my plugin so something else is amiss. Entering an otherwise correct wp-login.php address should not produce a completely blank “not_found” just by turning on the plugin either. Puzzling. Have you got some other domain redirecting plugin? Is the “cxcgmmcihqqpzzlth0ncon” a new site activation key? Are the blogs you are attempting to see active in your Network->Sites page?

    Backup a few steps and have another go making dead certain everything works before you add a new wrinkle to your install.

    Something – unspecific – sure seems bjorked up there.

    Test re-enabling plugins/settings one at a time until you reproduce the error.

    Without knowing what other plugins/theme you have installed there, there is not much else to go on.

    Why would you suspect htaccess? If you fiddled there, get that all working again.

    Thread Starter bg01

    (@bg01)

    Hey David,

    I figured out the problem and we were both right — a security plugin I’m using was messing with my .htaccess file. It was obscuring the login directory by adding a “slug” as an extra measure of security.

    Thanks so much for your help — really appreciate it!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Logging users into their respective subdomains through primary domain’ is closed to new replies.