Tip: We recommend that you explicitly specify the route settings for the default group in the module parameters, although this is not a required default project group route.
The general syntax of route configuration is:
- Return array (
- 'Routename' => array ('Module name', 'Operation name', 'parameter defining', 'additional parameter '),
- );
For the default group, the routing is used in the same way as the original one, that is, the general syntax is used. For example:
- Return array (
- 'P' => array ('article', 'view', 'id '),
- );
Article is the default HOME project
Article module. view is an operation.
- Http://www.phplo.com/p/12345
- Http://www.phplo.com/Article/view/12345
Non-default project group routing
If a non-default project group uses a route, the project group ID must be added:
- Return array (
- 'User' => array ('admin. user', 'view', 'id '),
- );
This example is the User in the Admin group.
View Operation route of the module.
- Http://www.phplo.com/user/12345
- Http://www.phplo.com/Admin/User/view/12345
Similarly, the wildcard routing configuration follows the preceding rules.
Tip: We recommend that you explicitly specify the route settings of the default group in the module parameters, although this is not required.
Read more
ThinkPHP
URL routing configuration
ThinkPHP URL access mode