当前位置:论坛首页 > Windows面板 > 建议

Windows+iis6宝塔下WordPress伪静态规格下分类、标签失效的问题

发表在 Windows面板2023-8-8 14:29 [复制链接] 0 984

宝塔里原来的的规则:
  1. <?xml version="1.0" ?>
  2. <rules>
  3.         <rule name="category_rewrite">
  4.                 <match url="category/?(.*)"/>
  5.                 <conditions logicalGrouping="MatchAll" trackAllCaptures="false"/>
  6.                 <action type="Rewrite" url="/index.php?category_name={R:1}" appendQueryString="false" logRewrittenUrl="false"/>
  7.         </rule>
  8.         <rule name="tags_rewrite">
  9.                 <match url="tag/?(.*)"/>
  10.                 <conditions logicalGrouping="MatchAll" trackAllCaptures="false"/>
  11.                 <action type="Rewrite" url="index.php?tag={R:1}"/>
  12.         </rule>
  13.         <rule name="Main Rule_rewrite" stopProcessing="true">
  14.                 <match url=".*"/>
  15.                 <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
  16.                         <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
  17.                         <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
  18.                 </conditions>
  19.                 <action type="Rewrite" url="index.php/{R:0}"/>
  20.         </rule>
  21.         <rule name="wordpress_rewrite" patternSyntax="Wildcard">
  22.                 <match url="*"/>
  23.                 <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
  24.                         <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
  25.                         <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
  26.                 </conditions>
  27.                 <action type="Rewrite" url="index.php"/>
  28.         </rule>
  29.         <rule name="WordPress: https://ruderal.cn_rewrite" patternSyntax="Wildcard">
  30.                 <match url="*"/>
  31.                 <conditions>
  32.                         <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
  33.                         <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
  34.                 </conditions>
  35.                 <action type="Rewrite" url="index.php"/>
  36.         </rule>
  37. </rules>
复制代码


在第9行的tag前添加一个“/”以修改标签路径:
  1. <match url="/tag/?(.*)"/>
复制代码

保存,无需重启IIS,问题解决。

使用道具 举报 只看该作者 回复
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

企业版年付运维跟进群

普通问题处理

论坛响应时间:72小时

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

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

紧急问题处理

论坛响应时间:10分钟

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

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

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

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