IIS服务器下发布文章后编辑再提交404?

提示如下:

404 Not Found

来源链接是否正确?用户、话题、问题或文字是否存在?

网址:http://danphy.xicp.net/article/edit/2 。


请先 登录 后评论

2 个回答

宋登峰 - 官方技术支持
擅长:tipask,php,服务器,网站建设
<!--
    Rewrites requires Microsoft URL Rewrite Module for IIS
    Download: https://www.microsoft.com/en-us/download/details.aspx?id=47337
    Debug Help: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules
-->
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Imported Rule 1" stopProcessing="true">
          <match url="^(.*)/$" ignoreCase="false" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
          </conditions>
          <action type="Redirect" redirectType="Permanent" url="/{R:1}" />
        </rule>
        <rule name="Imported Rule 2" stopProcessing="true">
          <match url="^" ignoreCase="false" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
          </conditions>
          <action type="Rewrite" url="index.php" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>


以上是tipask IIS下的伪静态规则,IIS版本需要8.0以上。

请先 登录 后评论
danphy

应该是伪静态问题。我不懂,下面是我在网上搜索到的伪静态配置:<?xml version="1.0" ?>
<rules>
    <clear/>
    <rule name="已导入的规则 1_rewrite">
        <match ignoreCase="false" url="^.*$"/>
        <conditions logicalGrouping="MatchAll">
            <add ignoreCase="false" input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
            <add ignoreCase="false" input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
        </conditions>
        <action appendQueryString="false" type="Rewrite" url="index.php?{R:0}"/>
    </rule>
</rules>
应该怎样改一下才能解决编辑文章提示404错误呢?

请先 登录 后评论