My router seems to ignore the base url set in the url service and sets 'phal' as controller in for instance https://server.com/phal/index/index. Why is that? My service loader:
$di->set('url', function () use ($config) {
$url = new UrlResolver();
$url->setBaseUri('/phal/');
return $url;
}, true);
//Registering a router
$di->set('router', function(){
$router = new Router();
$router->setDefaultModule("frontend");
$router->add('/:controller/:action/:params', array(
'module' => 'frontend',
'controller' => 1,
'action' => 2,
'params' => 3
));
$router->removeExtraSlashes(true);
return $router;
});
The code worked on windows with xampp bot I can not make it run on debian nginx