URI /<numbers> returns index view always

I've downloaded and installed version 3.4 on Nginx. Nginx config is

server {
    listen 81;
    server_name vm;
    root /home/nutzer/www/phalcon/public;
    index index.php;
    charset utf-8;

    location / {
        try_files $uri $uri/ /index.php?_url=$uri&$args;
    }
    location ~ \.php$ {
        fastcgi_pass  unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index /index.php;
        include fastcgi_params;
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        fastcgi_param PATH_INFO       $fastcgi_path_info;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
    location ~ /\.ht {
        deny all;
    }
}

And project is setup by phalcon dev tools and completely untouched. When calling "http://vm:81/bingo" I get an error, that "BingoController" cannot be loaded, which is correct as it does not exist. But why does an URL like "http://vm:81/3948234" returns the index page. I can use random numbers and get index page always, only when adding letters the exception is thrown. What is wrong there? As mentioned, the project is freshly setup.

I think there is not an error there, but a misunderstanding. You can not have a class called 123Controller then consider 123 as a parameter and go to IndexController. Read loader, dispatcher, router and app with this then everything will be easier ;)

Good luck



443

I'm still learning and I think I understand a bit more, but it still does not explain this behavior to me. When creating a skeleton app via phalcons dev tools, I cannot find any hint code that points out if and why numeric values should be used as params. Skeleton app has no routes defined, so all calls should give a 404.