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

前端 未结 2 617
独厮守ぢ
独厮守ぢ 2020-12-20 02:00

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(code

相关标签:
2条回答
  • 2020-12-20 02:52

    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]
    
    0 讨论(0)
  • 2020-12-20 02:53

    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]
    
    0 讨论(0)
提交回复
热议问题