Codeigniter Web 应用程序不适用于 linux,但在 Windows 上很好

2022-01-13 00:00:00 centos php codeigniter

Codeigniter 网络应用无法在 linux 上运行,但在 windows 上运行良好

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

i have install wamp server on my windows and i set my application(codeigniter) there is working fine but here on linux(Centos) other php application are just woking fine but only this codeigniter app is not working

那里有它需要的任何包或...

there there any pakage does it requires or ...

谢谢

推荐答案

正如@Orangepill 的评论中所述,它也可能是区分大小写的 unix 文件系统,根据我自己的经验,它连接到 .htaccess 解析不同:

As stated in the comment by @Orangepill it could be either case sensitive unix filesystem either, in my own experience it was connected to the .htaccess parsed differently:

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

有时这些在 linux 上会失败,因为它需要在 index.php 之后添加一个 ? 符号,因此您可以尝试:

Sometimes these fail on linux as it requres an ? sign after index.php so you can try:

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

相关文章