情况描述如下,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 页。
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.