Codeigniter, routing is not functioning on production server

后端 未结 4 424
感动是毒
感动是毒 2021-01-18 04:22

I have 3 servers, a localhost apache server, a testing remote server and the production live server.

I have the same installation of codeigniter and site set-up on a

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-18 05:18

    This is quite a common problem that often occurs when people move a codeigniter install from one environment to another. I have no idea why it occurs, could be a difference in server OS or apache settings, but the solution is often to add a question mark ? to the RewriteRule for the index.php in your .htaccess file.

    Old:

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

    New:

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

提交回复
热议问题