Codeigniter web app is not working with the linux

2019-01-27 01:47发布

问题:

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

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 ...

thanks

回答1:

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]

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

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


回答2:

add .htaccess file and check controller and models name first letter required capital (in Linux)

.htaccess

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