Codeigniter web应用程序不与linux一起工作,但这里在windows上是好的


Codeigniter web app is not working with the linux but here on windows is fine

Codeigniter web应用程序不能与linux一起工作,但这里在windows上是好的

我已经在我的windows上安装了wamp服务器,我设置了我的应用程序(codeigniter)有工作正常,但这里在linux(Centos)其他php应用程序只是工作正常,但只有这个代码编写程序不工作

那里有行囊,它需要还是…

谢谢

正如@Orangepill评论中所述,它可能是大小写敏感的unix文件系统,在我自己的经验中,它连接到以不同方式解析的.htaccess:

RewriteEngine on
RewriteCond $1 !^(index'.php|images|robots'.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

有时这些在linux上失败,因为它需要在index.php之后加上?符号,所以你可以尝试:

RewriteRule ^(.*)$ /index.php?/$1 [L]

添加。htaccess文件,检查控制器和型号名称首字母大写(Linux)

. htaccess

 RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]