当前位置:论坛首页 > Windows面板 > 求助

【已解决】宝塔 Windows面板 IIS wordpress伪静态问题

发表在 Windows面板2021-4-26 22:32 [复制链接] 2 4685

宝塔 Windows面板 IIS wordpress伪静态问题,/wp-admin/edit-tags.php?taxonomy=post_tag  和 /wp-admin/edit-tags.php?taxonomy=category 打开404错误,如何解决啊?
使用道具 举报 只看该作者 回复
发表于 2021-4-26 22:34:14 | 显示全部楼层
<?xml version="1.0" ?>
<rules>
        <rule name="category_rewrite">
                <match url="category/?(.*)"/>
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false"/>
                <action appendQueryString="false" logRewrittenUrl="false" type="Rewrite" url="/index.php?category_name={R:1}"/>
        </rule>
        <rule name="tags_rewrite">
                <match url="tag/?(.*)"/>
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false"/>
                <action type="Rewrite" url="index.php?tag={R:1}"/>
        </rule>
        <rule name="Main Rule_rewrite" stopProcessing="true">
                <match url=".*"/>
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
                </conditions>
                <action type="Rewrite" url="index.php/{R:0}"/>
        </rule>
        <rule name="wordpress_rewrite" patternSyntax="Wildcard">
                <match url="*"/>
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <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>
用面板默认的伪静态。
使用道具 举报 回复 支持 反对
发表于 2021-4-26 22:43:52 | 显示全部楼层
问题解决:
第一步安装:IIS Chinese Tag Permalink插件
第二步伪静态规则改为:
<?xml version="1.0" ?>
<rules>
        <rule name="category_rewrite">
                <match url="category/?(.*)"/>
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false"/>
                <action appendQueryString="false" logRewrittenUrl="false" type="Rewrite" url="/index.php?category_name={R:1}"/>
        </rule>
        <rule name="Main Rule_rewrite" stopProcessing="true">
                <match url=".*"/>
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
                </conditions>
                <action type="Rewrite" url="index.php/{R:0}"/>
        </rule>
        <rule name="wordpress_rewrite" patternSyntax="Wildcard">
                <match url="*"/>
                <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <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>
完美解决问题。
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

企业版年付运维跟进群

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理
快速回复 返回顶部 返回列表