情况描述如下,SOF 上也翻了一遍,不得要领。请教下各位大佬。。
IIS 7.5(IIS_UrlRewriteModule 7.1.0871.0) + CI 3.1.9 + PHP 5.6.37
<rule name="rule1" stopProcessing="true">
<match url="^uploads/?$|^uploads/(.*)$" />
<action type="Rewrite" url="index.php/home/attach.html?id=uploads/{R:1}" appendQueryString="true" logRewrittenUrl="false" />
</rule>
<rule name="rule2" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" />
</rule>
http://example.com/uploads/testf6acf1d64660ea738bcf9163320b3b7f.png
正常跳转到 http://example.com/index.php/home/attach.html?id=uploads/testf6acf1d64660ea738bcf9163320b3b7f.png ,显示 attach 文字,内容正确。
显示 CI 默认的 404 页。