【发布时间】:2016-03-08 10:42:28
【问题描述】:
我在 IIS 上遇到了 Cakephp 3.2 版的问题。但是,Cakephp 2.2 版在相同的设置环境中运行良好。不知道为什么?
这是我的web.config 文件。
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Exclude direct access to webroot/*"
stopProcessing="true">
<match url="^webroot/(.*)$" ignoreCase="false" />
<action type="None" />
</rule>
<rule name="Rewrite routed access to assets(img, css, files, js, favicon)"
stopProcessing="true">
<match url="^(img|css|files|js|favicon.ico)(.*)$" />
<action type="Rewrite" url="webroot/{R:1}{R:2}"
appendQueryString="false" />
</rule>
<rule name="Rewrite requested file/folder to index.php"
stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<action type="Rewrite" url="index.php"
appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
以上内容抄自Official Cakephp forum。
无论我们输入什么 URL,我都会得到以下响应
注意:
我尝试了 SO 中的所有相关链接,并在尝试了所有提供的解决方案后发布了此链接,但没有一个有效。
更多信息:
IIS 版本 - 10 Cakephp - 3.2
我再说一遍,Cakephp 2.2 运行良好。
【问题讨论】:
-
您应该检查错误日志并发布相关消息。
标签: cakephp iis cakephp-3.0 iis-10