how to remove module name from url in yii [duplica

2019-07-24 09:48发布

问题:

This question already has an answer here:

  • Yii - Hiding module name in URL 2 answers

I try to remove module name from url in YII

http://testdomail.com/demo/user/create 

I want

http://testdomail.com/user/create 

Where demo is my module name. How can I do this?

回答1:

You can define any url in your config by making some changes in your configuration file main.php.

Please have a look here.