我的urlManager有以下配置:
[
'enablePrettyUrl' => true,
'showScriptName' =>false,
'rules' => [
'add?step=first' => 'advert/first',
'add?step=second' => 'advert/second'
],
例如,当我转到add?step=second
时,它应该运行advert/second
,但它会给我404错误。如何使它工作?
答案 0 :(得分:0)
请尝试使用此规则:
'<add:(step=first)>' => 'advert/first',
'<add:(step=second)>' => 'advert/second'