We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Automatic routing don't work

Hello, When i go to url:

https://myapp.dev/segmentation

I got error "IndexController handler class cannot be loaded", it's because I removed IndexController.php, but why phalcon is trying to run IndexController when he should run SegmentationController?

I am using nginx, I think problem is with my configuration:

    server {

        listen   80;
        server_name myapp.dev;

        index index.php index.html index.htm;
        set $root_path '/var/www/myapp/public';
        root $root_path;

        location / {
            try_files $uri $uri/ /index.php;
        }

        location ~ \.php$ {

            try_files $uri $uri/ =404;

            fastcgi_split_path_info ^(.+\.php)(/.+)$;

            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
        }

        location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
            root $root_path;
        }

        location ~ /\.ht {
            deny all;
        }

        location /phpmyadmin {

           root /usr/share/;
           index index.php index.html index.htm;

           location ~ ^/phpmyadmin/(.+\.php)$ {

                try_files $uri $uri/ =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;

                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
           }

           location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
             root /usr/share/;
           }

         }
    }

What's the problem?