Different prefix, same controller/template

Hi
I use cakephp 3 :heart_eyes:, I have a plugin that could be used with/without prefix or different prefix.
How I must do the route to use same controller/template?
ES:

  • /admin/media/medias/upload
  • /member/media/medias/upload
  • /media/medias/upload

that use /plugins/Media/src/Controller/MediasController.php
Thanks

something like ["plugin"=>"Media","controller"=>"medias","action"=>"upload"] should do the trick

no, I need to use the prefix because I have to check user session before when use some prefix.