Codeigniter, routing is not functioning on production server

后端 未结 4 422
感动是毒
感动是毒 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 04:59

    Check your Apache virtual host configuration and verify that you have AllowOverride All in your directory definition.

    0 讨论(0)
  • 2021-01-18 04:59
    1. Maybe something is wrong with your .htaccess file?

      Once I had problem when I moved application to production server, because RewriteBase was set to some directory on development server.

      On my production server application was in web root directory, so RewriteBase should be /, and i had /something there.

    2. Once i had silly problem with upper/lowercases, when i moved site from development server (windows) to production (linux).

    0 讨论(0)
  • 2021-01-18 05:10

    I had the same problem. I was using function to convert article names to URL's (slugify).

    On localhost and on server this function returned slightly different urls.

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