routes not work, only default method, CI4 |
Hi for all, i need help with this..
PHP Code: [color=#9cdcfe]$routes[/color][color=#d4d4d4]->[/color][color=#dcdcaa]setDefaultNamespace[/color][color=#d4d4d4]([/color][color=#ce9178]'App\Controllers'[/color][color=#d4d4d4]);[/color] but not acces to main method **SEO LINK REDACTED** i know CI2 with php 5.6, now i use php 7.2, CI4.0.0 rc3, ubuntu apache in azure
Yopu got carried away with formatting, by the look of it, rendering your post effectively inreadable. Needs fixing.
This is what it should look like
PHP Code: $routes->setDefaultNamespace('App\Controllers'); You are not telling us what your problem is so that we can understand it. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(11-28-2019, 04:59 AM)InsiteFX Wrote: This is what it should look like when i tried open domain.com/public/main it trigger 404 not found, buth method Home::main exist $routes->get('/main', 'Home::index'); i tried multiple options, like remap and not appears take main from url... public function _remap($method) { if ($method === 'some_method') { error_log("method arrive".$method); $this->$method(); } else { $this->default_method(); } } error_log("method arrive".$method); only print " index" not print main when i tried
i also tried $routes.add();
and this same $routes->setDefaultNamespace('App\Controllers'); $routes->setDefaultController('Home'); $routes->setDefaultMethod('index'); $routes->setTranslateURIDashes(false); $routes->set404Override(); $routes->setAutoRoute(true);
and i deployed in azure VM (ubuntu 18) i am new with azure, maybe CI has some problem with azure...?
OK: solved it, problems with apache2 :
rewite_engine is off and .htaccess files is default disabled |
Welcome Guest, Not a member yet? Register Sign In |