Cannot log into mapped site with admin account

Sites in my network that are subdomains of the main site all work as expected. :
networkdomain.com (main network)
subdomain.networkdomain.com

Sites in the network, but mapped to their live domain: for example---mappeddomain.com, logins are not getting in. mappeddomain.com is a mapped domain in the networkdomain.com network. The only user on mappeddomain.com is admin. This admin account is the super admin account of the network. Trying to access the dashboard of mappeddomain.com from within the networkdomain.com redirects to mappeddomain.com login prompt, but the admin account fails to log in.

I am sure there is a simple answer but I am stumped. Any help would be appreciated.

  • Jack Kitterhing
    • Code Norris

    Hi there @HazenReed

    i hope you are well today and thanks for your question.

    If you are using a domain mapped area and the domain isn't resolving to the new location yet, the admin area would be inaccessible, can you confirm when you mapped the domain and created the A record please?

    Thank you!

    Kind Regards
    Jack.

  • hazenreed
    • Design Lord, Child of Thor

    Hi Jack, the domain is HazenReed.com. it is resolving. It was set up months ago. I have been trying to sort this issue out for months, on and of, between other work.

    When I am logged into the network site's admin, and navigate to the 'dashboard' link on hazenreed.com, the url changes to hazenreed.com/wp-admin

    the log in prompt appears, and trying to log in with the admin creds from the network just cycles back to the log in prompt again.

    Hope this helps....

  • Jack Kitterhing
    • Code Norris

    Hi @HazenReed

    Thanks for the clarification, unfortunately domain mapping doesn't support Single Sign On, which could be part of the issue here.

    Can you create a admin user on the sub site, then when it logs you out, try and login with that admin user and see what happens please?

    Thank you!

    Kind Regards
    Jack.

  • hazenreed
    • Design Lord, Child of Thor

    Hi Jack, Your reply makes some sense, but also seems a bit odd to me. However, I have added a user from within the network administration. I have made that user and admin of the target site: hazenreed.com.

    If I try to log in to the target domain: hazenreed.com with the new user account, the login prompt cycles back to a blank log in screen. No message about access privileges or anything, just login screen. If I try to log in the network site with the new user's creds. I get this message:
    -----
    You attempted to access the "Mure Media " dashboard, but you do not currently have privileges on this site. If you believe you should be able to access the "Mure Media " dashboard, please contact your network administrator.

    If you reached this screen by accident and meant to visit one of your own sites, here are some shortcuts to help you find your way.
    Your Sites
    Hazen Reed Visit Dashboard | View Site
    ----

    This makes sense, because the new users is not listed as an admin on the network, only on the target site:hazenreed.com

    So I am still stumped.

  • hazenreed
    • Design Lord, Child of Thor

    Hi Jack,

    Here is the .htaccess contents.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    </IfModule>

    # END WordPress

  • Jack Kitterhing
    • Code Norris

    Hi there @HazenReed

    Thanks for the additional information.

    If the server is IIS, this means that a .htaccess file won't work, IIS doesn't support Apache mod_rewrite.

    There should be a web.config with different specific rules for this, do you have a web.config file?

    Thank you!

    Kind Regards
    Jack.

  • hazenreed
    • Design Lord, Child of Thor

    Hi Jack, I thought that would be the case. sorry for being a little slow...
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <system.webServer>
    <rewrite>
    <rules>
    <rule name="CanonicalHostNameRule1" enabled="false">
    <match url="(.*)" />
    <conditions>
    <add input="{HTTP_HOST}" pattern="^www\.muremedia\.com$" negate="true" />
    </conditions>
    <action type="Redirect" url="http://www.muremedia.com/{R:1}" />
    </rule>
    <rule name="WordPress Rule 1" stopProcessing="true">
    <match url="^index\.php$" ignoreCase="false" />
    <action type="None" />
    </rule>
    <rule name="WordPress Rule 2" stopProcessing="true">
    <match url="^([_0-9a-zA-Z-]+/)?files/(.+)" ignoreCase="false" />
    <action type="Rewrite" url="wp-includes/ms-files.php?file={R:2}" appendQueryString="false" />
    </rule>
    <rule name="WordPress Rule 3" stopProcessing="true">
    <match url="^([_0-9a-zA-Z-]+/)?wp-admin$" ignoreCase="false" />
    <action type="Redirect" url="{R:1}wp-admin/" redirectType="Permanent" />
    </rule>
    <rule name="WordPress Rule 4" stopProcessing="true">
    <match url="^" ignoreCase="false" />
    <conditions logicalGrouping="MatchAny">
    <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" />
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" />
    </conditions>
    <action type="None" />
    </rule>
    <rule name="WordPress Rule 5" stopProcessing="true">
    <match url="(^[_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*)" ignoreCase="false" />
    <action type="Rewrite" url="{R:2}" />
    </rule>
    <rule name="WordPress Rule 6" stopProcessing="true">
    <match url="^([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" />
    <action type="Rewrite" url="{R:2}" />
    </rule>
    <rule name="WordPress Rule 7" stopProcessing="true">
    <match url="." ignoreCase="false" />
    <action type="Rewrite" url="index.php" />
    </rule>
    </rules>
    <outboundRules>
    <preConditions>
    <preCondition name="muremediablog">
    <add input="{RESPONSE_CONTENT_TYPE}" pattern="muremedia.com/blog" />
    </preCondition>
    </preConditions>
    </outboundRules>
    </rewrite>
    <httpRedirect enabled="false" destination="" />
    <httpErrors>
    <remove statusCode="404" subStatusCode="-1" />
    <error statusCode="404" prefixLanguageFilePath="" path="/index.php" responseMode="ExecuteURL" />
    </httpErrors>
    </system.webServer>
    </configuration>

  • Jack Kitterhing
    • Code Norris

    Hi there @HazenReed

    I hope you are well today, sorry for the delay.

    I had a family emergency.

    That could very well be causing the issue, so your multisite is running of www. and it's a sub domain multisite? Do you have access to your DNS settings from your hosting control panel?

    Thank you!

    Kind Regards
    Jack.

  • Jack Kitterhing
    • Code Norris

    Hi there @HazenReed

    I hope you are well today.

    In this case, what would be ideal is to change the IIS rules to omit the www. part of the domain.

    Run a find and replace within the database for the www. and replace with the non www.

    Then make sure the main A record is for the non www version, once this is done (the DNS could take upto 48hrs for the change to become live), it should then work :slight_smile:

    Thank you!

    Kind Regards
    Jack.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.