Default URL rule


Tell me how to better realize the situation when the URL of the first tries to perform controller hurr and method durr, but if controller or method does not exist, then forwards the request in a specially-prepared method, f.e. site controller.

Ie if controller hurr has method durr then execute it, if not - perform site/page and pass the parameter URI (hurr/durr).


The Logic is that

When a user request the URL, System will first search for the Module and if it is a module, then it searches for the controller of the module being called based on the file names, after the system finds the controller, it check all the functions with prefix is action and it it is found, then results are displayed else it through an exception and forward the request to 404 page.

You can also check after enabling the log and accessing the URL.