Support » Networking WordPress » Cannot Open Dashboard on New Sites

  • Resolved chaplaindoug

    (@chaplaindoug)


    I have created a new multisite network. I can get to the dashboard on the network admin and the first main site. But when I create new sub-sites and try to go to their dashboard, I get an error page saying “404 – File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.”
    The sub-sites create fine from the Network Admin>Add Site dialogue. I just cannot get to the dashboard for any sub-sites created. Any HELP! will be appreciated. Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter chaplaindoug

    (@chaplaindoug)

    SOLUTION FOUND. BUT WHY???

    I went to another multisite network I created that has been working fine. I simply copied the web.config file from that working site into my non-working site. The site on which I was having problems now works.

    The web.config I copied in has seven (7) rules instead of the six (6) rules contained in the web.config that did not work. The non-working web.config was created using the text given in the Network Setup page.

    Below is the WORKING web.config, followed by the NON_Working web.config. It appears that the additional rule (Rule 2 in the working version) is the one that made the difference. Anyone know why it fixed it?

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <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>
            </rewrite>
        </system.webServer>
    </configuration>

    THE NON-Working version:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <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-]+/)?wp-admin$" ignoreCase="false" />
                        <action type="Redirect" url="{R:1}wp-admin/" redirectType="Permanent" />
                    </rule>
                    <rule name="WordPress Rule 3" 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 4" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*)" ignoreCase="false" />
                        <action type="Rewrite" url="{R:1}" />
                    </rule>
                    <rule name="WordPress Rule 5" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" />
                        <action type="Rewrite" url="{R:2}" />
                    </rule>
                    <rule name="WordPress Rule 6" stopProcessing="true">
                        <match url="." ignoreCase="false" />
                        <action type="Rewrite" url="index.php" />
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Actually it’s not the extra rule.

    Compare the two and you’ll see the WORKING one has this:

    <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>

    The bad one has this:

    <rule name="WordPress Rule 4" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*)" ignoreCase="false" />
                        <action type="Rewrite" url="{R:1}" />
                    </rule>
                    <rule name="WordPress Rule 5" stopProcessing="true">
                        <match url="^([_0-9a-zA-Z-]+/)?([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" />
                        <action type="Rewrite" url="{R:2}" />
                    </rule>

    Compare those and you’ll see 🙂

    Thread Starter chaplaindoug

    (@chaplaindoug)

    So what does the “{R:2}” designate? I see “{R:1}” was the problem.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Second replace string.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cannot Open Dashboard on New Sites’ is closed to new replies.