zoukankan      html  css  js  c++  java
  • 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>
  • 相关阅读:
    数据分析之异常值分析-箱线图
    PHP学习路线图(转)
    学习简易爬虫设计(转)
    学习扫码登录的例子
    2017年PHP程序员未来路在何方(转)
    一个PHP开发APP接口的视频教程
    PHP实现Restful风格的API(转)
    大型网站技术架构-入门梳理(转)
    PHP面试总结(转)
    大型网站系统架构的演化(转)
  • 原文地址:https://www.cnblogs.com/lola/p/9636162.html
Copyright © 2011-2022 走看看