假设注册了一个名为article的Module,是不是以article开头的url(开启enablePrettyUrl,关闭showScriptName)都只能路由到article这个Module,不能是其他的Controller吗?
假设注册了一个名为article的Module,是不是以article开头的url(开启enablePrettyUrl,关闭showScriptName)都只能路由到article这个Module,不能是其他的Controller吗?
看了一下api文档,当enablePrettyURL为true时可以自行配置。
A special shortcut format can be used if a rule only specifies pattern
and route: 'pattern' => 'route'. That is, instead of using a
configuration array, one can use the key to represent the pattern and
the value the corresponding route. For example, 'post/<id:\d+>' =>
'post/view'.
这里的route应该可以自定义。
1 回答4k 阅读✓ 已解决
3 回答1.8k 阅读✓ 已解决
2 回答2.2k 阅读✓ 已解决
1 回答1.3k 阅读✓ 已解决
2 回答2.2k 阅读
1 回答484 阅读✓ 已解决
3 回答1.5k 阅读
配置文件中urlmanager 属性rules中为你其他特别的要article打头的控制器配置规则,应该有效