在wordpress子域上的子目录多站点的管理面板上出现404错误 [英] getting 404 error on admin panel for sub-directory multisite on a sub-domain in wordpress

查看:38
本文介绍了在wordpress子域上的子目录多站点的管理面板上出现404错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 IIS 服务器并在我的子域上安装了子目录多站点.我已经导航到超级管理员"->站点"并使用添加新站点"来创建一个新站点.这似乎有效,但样式不存在.主页完全搞砸了,但它被添加到站点列表中.如果我单击编辑"或转到后端",则会收到 404 错误消息(找不到页面).我该怎么办??

I am using IIS server and have installed sub-directory multisite on my subdomain. I have navigated to 'Super Admin -> 'Sites' and used 'Add New' to create a new site. This appears to work, but styling is not there. The homepage is messed up completely but it is added to the list of sites. If I click on Edit or go to Backend, then I get a 404 error message (page not found). What should I do ??

推荐答案

刚刚得到了正确的答案.web.config 文件中存在错误.正确代码如下:

just got the right answer for this. There is a mistake in web.config file. The correct code is as follows:

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

这篇关于在wordpress子域上的子目录多站点的管理面板上出现404错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆