【发布时间】:2014-08-12 08:51:16
【问题描述】:
好的,这不是重写错误,因为我没有接触 conf 文件。
我用http://www.farinspace.com/install-and-configure-nginx-server/做web服务器。
问题是 CodeIgniter 和 Kohana 确实适用于 http://url.com/sub/ 和 http://url.com/sub/index.php
但是,它不适用于 http://url.com/sub/index.php/welcome 或任何控制器(我这样说对吗?),我得到 404 Not found。
【问题讨论】:
-
我使用 sub 是因为我的文件位于子目录中,如果这很重要的话。
-
$_SERVER['SCRIPT_NAME']和$_SERVER['PHP_SELF']中有什么内容? -
对他们来说都是 /sub/index.php
-
当有一个有据可查的 wiki 时,不要使用随机的网络帖子来配置 Nginx。例如,该站点上显示的
location ~ \.php$ {配置可能会让您被黑客入侵。 See This Link -
谢谢。自从我在 nginx 的不同教程中看到该链接后,我已经对其进行了更改。
标签: codeigniter ubuntu nginx kohana-3 php