php - YII2 - Unable to access submodule's DefaultController action -


i'm trying figure out how access other actions inside defaultcontroller of module. have module structure.

 --module    --website      --module        --hub 

hubmodule submodule inside website module, can access url website/default/index no problem there, problem website/hub/default/index not accessible.

but website/hub/default good, can't have that. tried new action actiontest inaccessible also. here config have

'urlmanager' => [    'enableprettyurl' => true,    'showscriptname' => false,    'enablestrictparsing' => true,    'rules' => [        // default ruling module/controller/action route work        '<module:\w+>/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>',    ], ], 

i kinda solve own problem this, configuration

'urlmanager' => [    'enableprettyurl' => true,    'showscriptname' => false,    'enablestrictparsing' => true,    'rules' => [       // default ruling module/controller/action route work       '<module:\w+>/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>',       '<module:\w+>/<submodule:\w+>/<controller:\w+>/<action:\w+>' => '<module>/<submodule>/<controller>/<action>',    ], ], 

format should <module>/<submodule>/<controller>/<action> didn't know submodule reserve word in yii url config, still have issue.

when create action actionthisexample url should website/hub/default/this-example, goes 404 page. when actionthisexample url website/hub/default/thisexample works. not have url s in case.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -