0

how to config codeigniter in nginx

I install nginx and config code egniter in there but when program want show controllers not working.and show error 404 not found .

14th Jul 2017, 10:45 AM
pirooz jenabi
pirooz jenabi - avatar
4 Réponses
14th Jul 2017, 11:35 AM
Shamima Yasmin
Shamima Yasmin - avatar
+ 7
I'm not familiar with nginx, but the URLs must be written in a particular way in CodeIgniter. Make sure you're following that. Welcome is the default controller and index is the default function. If you want to access this index function, just write: localhost/Project_name For example, if your project name is MyNewProject, controller name is MyFirstController (must start with upper case) and function name is display(), then the url should be: localhost(or server address)/MyNewProject/index.php/myFirstController/display *(notice the lower case m in url) ** You can change the default controller from Application/config/routes.php and base url from Application/config/config.php
14th Jul 2017, 11:24 AM
Shamima Yasmin
Shamima Yasmin - avatar
0
thank you for answer . but I want config like htaccess ,in apache. how I can config nginx like apache where use httaccsss mod-rewrite .merci
14th Jul 2017, 11:28 AM
pirooz jenabi
pirooz jenabi - avatar
0
before I read this ,but this solution not worked . 😧😧😧😧
14th Jul 2017, 11:52 AM
pirooz jenabi
pirooz jenabi - avatar