微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

php – WordPress permlink在godaddy中显示“你应该立即更新你的web.config.”

在Godaddy WordPress网站没有显示内页,它只显示主页和wordpress管理页面.单击“永久链接设置”中的保存更改时,它会显示“您应该立即更新您的web.config”.当我在我的网站中添加web.config显示500错误(主页和管理页面也是)现在该怎么办?修复500错误或修复404错误以及如何修复?请帮助我.
我的.htaccess文件在下面

# BEGIN wordpress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.PHP$- [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.PHP [L]
</IfModule>

# END wordpress

解决方法:

你正在使用Windows服务器,所以你需要在wordpress的根文件夹中的web.config,

如果在根文件夹中找不到web.config,则添加web.config文件并将下面的代码添加到其中,

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Main Rule" stopProcessing="true">
                    <match url=".*" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.PHP" />
                </rule>
            </rules>
        </rewrite>
        <staticContent>
            <remove fileExtension=".svg" />
            <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
        </staticContent>
        <defaultDocument>
            <files>
                <remove value="index.aspx" />
                <add value="index.PHP" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>

文件夹是指包含wp-content,wp-includes等的文件夹,

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐