當你發現 CodeIgniter 3 在windows 執行好好的,但是移到 ubuntu 或linux上後 會發現全部變成,404 Page Not Found The page you requested was not found.
如果 .htaccess 設定了
也確定 $config['uri_protocol'] = 'REQUEST_URI'; (CI3 預設就是這個)
php CGI/FastCGI 也啟動了。
apache CGI 也開啟。
還是一直錯誤的話!!!
有個原因是 CI3 在 linux 底下的所有 controller 開頭都要以大寫為準!!
例如:
rest.php <----Not Found
Rest.php<-----can Found
這是ci3特有的問題。
我是參考這句話:
I found the solution for who uses Code Igniter 3.0 the controller name needs to be like this "Pagecontrol" if is "pagecontrol" the CodeIgniter core do not find the controller, libraries, views, and things like this.
出處為:http://stackoverflow.com/questions/28368658/404-code-igniter-on-a-live-web-server