Wordpress的Web.Config问题

Wordpress的Web.Config问题,wordpress,web-config,url-rewrite-module,Wordpress,Web Config,Url Rewrite Module,我有一个网站,其中一部分使用Worpress。我的索引页有问题 该站点加载最新的帖子,这是带有错误url的所需操作,这是所需的url,页面将加载404模板 我有正确的本地工作的网站。我唯一能想到的是web.config错误地路由了这个请求。由于这是一个我处理得不好的领域,我希望得到一些帮助,看看这是否是问题所在 以下是web.config的内容: <?xml version="1.0" encoding="UTF-8"?> <configuration> <

我有一个网站,其中一部分使用Worpress。我的索引页有问题

该站点加载最新的帖子,这是带有错误url的所需操作,这是所需的url,页面将加载404模板

我有正确的本地工作的网站。我唯一能想到的是web.config错误地路由了这个请求。由于这是一个我处理得不好的领域,我希望得到一些帮助,看看这是否是问题所在

以下是web.config的内容:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Imported Rule 2-1" stopProcessing="true">
                    <match url="." ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

听起来默认文档列表中没有index.php。将index.php添加到列表中,如下所示。您还可以通过默认文档的IIS设置来执行此操作

    <defaultDocument>
        <files>
            <clear />
            <add value="index.php" />
            <add value="index.asp" />
            <add value="Default.asp" />
            <add value="Default.htm" />
            <add value="index.htm" />
            <add value="index.html" />
            <add value="iisstart.htm" />
            <add value="default.aspx" />
        </files>
    </defaultDocument>

感谢您的回复。现在一切似乎都正常运行。