Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Router ignores baseurl

My router seems to ignore the base url set in the url service and sets 'phal' as controller in for instance Why is that? My service loader:

$di->set('url', function () use ($config) {
    $url = new UrlResolver();

    return $url;
}, true);

//Registering a router
$di->set('router', function(){
    $router = new Router();

    $router->add('/:controller/:action/:params', array(
        'module' => 'frontend',
        'controller' => 1,
        'action' => 2,
        'params' => 3

    return $router;

The code worked on windows with xampp bot I can not make it run on debian nginx


maybe location configuration problem ?

can you post the nginx config please


I fixed the error by remoing /phal from url passed by nginx