首页 > 其他 > 详细

iis wordpress 404错误 伪静态rewrite

时间:2018-09-12 19:30:43      阅读:211      评论:0      收藏:0      [点我收藏+]

https://jingyan.baidu.com/article/cbf0e500ebec582eaa2893d2.html

在wordpress根目录,将以下内容保存为 web.config 文件。

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

  <system.webServer>

    <rewrite>

      <rules>

                <rule name="category">

                    <match url="category/?(.*)" />

                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />

                    <action type="Rewrite" url="/index.php?category_name={R:1}" appendQueryString="false" logRewrittenUrl="false" />

                </rule>

                <rule name="tags">

                    <match url="tag/?(.*)" />

                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />

                    <action type="Rewrite" url="index.php?tag={R:1}" />

                </rule>

                <rule name="Main Rule" 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" 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>

    </rewrite>

  </system.webServer>

</configuration>

 

iis wordpress 404错误 伪静态rewrite

原文:https://www.cnblogs.com/lola/p/9636162.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!