routes working only in local |
I also tried this configuration:
Code: location /jobs/ { But you are blocked images and css file with a 404 error and also the controller still does not work ...
(06-10-2015, 03:31 PM)CroNiX Wrote: Codeigniter has nothing to do with the server it's being run on. The server, whether it's Apache, NGINX, LightHTTP, IIS or something else it needs to be set up to run the PHP application, whether it's CI or WordPress or something else. The application can't alter to webserver to "make itself run". No webserver runs PHP by default, except maybe PHP's built-in webserver. Ok, with this configuration: PHP Code: location /jobs/ { I return at the start point. With only default controller work and the all other controller return: EDIT: The only controller that not work is my custom routes Code: $route['page/(:any)'] = 'page/thread/$1'; Infact if I create a simply controller it works. I have to set something specific about nginx only for these controllers?
In routes.php Try replacing :any with .+
$route['login/(.+)'] = 'auth/login/$1'; It solved my problems. http://www.codeigniter.com/user_guide/ge...uting.html Posted from a tablet with one finger
(06-12-2015, 06:40 PM)John_Betong Wrote: In routes.php Try replacing :any with .+ Nothing. I have not solved. You use nginx? what is your setup? 'ACP' in my routes it is an directory. In different 'page' is a controller.
I discovered something.
The problem is not dependent on the configuration of my vps. I tried to install cms-canvas developed in codeigniter and it works perfectly every routes works perfectly without any problems. That problem could be in my small cms that makes it work on xampp but not on nginx?
Apparently not. Unfortunately that cms works differently.
I do not know really what to do.
|
Welcome Guest, Not a member yet? Register Sign In |