tgy3300
- tgy3300 提出了问题Yii2中如何跨应用调用方法?
URL manager 按照
rules
内规则声明的先后顺序依次检查,找到第一个匹配的规则后就会使用该规则,之后的所有规则,不管是否匹配,都会忽略。the URL manager examines the rules in the order they are declared and looks for the first rule that matches the requested URL. The matching rule is then used to parse the URL into a route and its associated parameters.
你声明的这两条规则中,
'article' => 'article/index'
是多余的,因为
index
是 default action, 可以自动识别。我知道可以自动识别,我就是不想用 article/index.html 这样的url,想用 article.html 这样的url
- tgy3300 回复了 dingjj2010 的回答
rules 里面 'login' => '/service/login'=> 'login' => 'service/login' 斜杠去掉试试。
不行就把log贴出来。试过了,没用
- tgy3300 提出了问题yii2 url美化问题