Module and URL management

(Sirinibin2006) #21

Thansk alot for this code… Worked well for me…

i was trying to apply few Rules specifically for a my api module…

(Konapaz) #22

The only way I found is described here

but is a little hack

(Marciocamello) #23

Look this rule


Works for me in all modules, controllers and actions with modules

(Ash Finlayson) #24

Thats the zend2 approach, like it.

Would that also mean that one is ultimately putting less rules in the main config therefore speeding up load time?

(Alexander Makarov) #25

Putting less rules — yes. Speeding up — no since you have to check rules regardless of their source.

(Steve) #26

Qiang this would be an excellent feature!

We have built many apps using Yii from small to very large complex apps modules are essential and this is precisely how we currently use Yii 1. Each module has a startup and we override the rules there… But it would be excellent to have this lower in the framework.

Is this currently in Yii 2.0 now? Did it get implemented?

(rssreader) #27

I have set
defaultRoute = “mainnewmodule”;

URL => mainnewmodule/controllers/DefaultController::actionIndex
Works OK.

returns the same content. How to disable this duplication? I don’t want to use a URL “”. What is the easiest solution?

Thanks for help.