• iis wordpress 404错误 伪静态rewrite


    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>
  • 相关阅读:
    emberjs初学记要
    自我的一点介绍(七夕礼物)
    JavaScript数据类型
    Vue+Webpack项目配置
    Git知识点整合
    Log4j简单配置解析
    如何明智地向程序员提问
    Navicat连接mysql报错1251
    多表查询sql语句
    PLSQL面向对象
  • 原文地址:https://www.cnblogs.com/lola/p/9636162.html
Copyright © 2020-2023  润新知